]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Added saveflags to stop classes from yeeting save files
authorReki <spiper212@gmail.com>
Fri, 21 May 2021 19:27:53 +0000 (15:27 -0400)
committerReki <spiper212@gmail.com>
Fri, 21 May 2021 19:27:53 +0000 (15:27 -0400)
protocol.h
prvm_edict.c
prvm_offsets.h

index 8d5849c6ec867511eb69b7e22523364d8556f444..204038831bad604d842f07924675c96a77529033 100644 (file)
@@ -744,6 +744,8 @@ void EntityFrame4_CL_ReadFrame(void);
 //CSQC Flags
 #define CSQCFLAG_SOLIDITY (1<<0)
 
+//Save Flags (these shouldn't be here but I don't know where to put them, sorry)
+#define SAVEFLAG_DONTSAVE (1<<0)
 
 // reset all entity fields (typically used if status changed)
 #define E5_FULLUPDATE (1<<0)
index 3c50397e70a4e324c5d4811758f4500418d6fdfe..8f33cf49faa8e5db7ae574e268a100cc57854ee6 100644 (file)
@@ -734,10 +734,12 @@ void PRVM_ED_Write (prvm_prog_t *prog, qfile_t *f, prvm_edict_t *ed)
        int             type;
        char vabuf[1024];
        char valuebuf[MAX_INPUTLINE];
+       
+       int saveflags = (int)(PRVM_serveredictfloat(ed, saveflags));
 
        FS_Print(f, "{\n");
 
-       if (ed->priv.required->free)
+       if (ed->priv.required->free || saveflags & SAVEFLAG_DONTSAVE)
        {
                FS_Print(f, "}\n");
                return;
index 61210039bc66b53756786aa46ff02007d3c70735..fb53c24fef45efa1fc8cf3246e98f230d2067d04 100644 (file)
@@ -377,6 +377,7 @@ PRVM_DECLARE_field(solid)
 PRVM_DECLARE_field(sounds)
 PRVM_DECLARE_field(spawnflags)
 PRVM_DECLARE_field(style)
+PRVM_DECLARE_field(saveflags)
 PRVM_DECLARE_field(tag_entity)
 PRVM_DECLARE_field(tag_index)
 PRVM_DECLARE_field(takedamage)
@@ -727,6 +728,7 @@ PRVM_DECLARE_serverfieldfloat(solid)
 PRVM_DECLARE_serverfieldfloat(sounds)
 PRVM_DECLARE_serverfieldfloat(spawnflags)
 PRVM_DECLARE_serverfieldfloat(style)
+PRVM_DECLARE_serverfieldfloat(saveflags)
 PRVM_DECLARE_serverfieldfloat(tag_index)
 PRVM_DECLARE_serverfieldfloat(takedamage)
 PRVM_DECLARE_serverfieldfloat(team)