]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Added '_n_' naming scheme to stop globals from being saved
authorReki <spiper212@gmail.com>
Sun, 23 May 2021 17:26:18 +0000 (13:26 -0400)
committerReki <spiper212@gmail.com>
Sun, 23 May 2021 17:26:18 +0000 (13:26 -0400)
prvm_edict.c

index 8f33cf49faa8e5db7ae574e268a100cc57854ee6..84321cb440b431a2a16217b58530a91e78da13a6 100644 (file)
@@ -911,6 +911,10 @@ void PRVM_ED_WriteGlobals (prvm_prog_t *prog, qfile_t *f)
                        continue;
 
                name = PRVM_GetString(prog, def->s_name);
+               
+               // terrible hack to make globals ending in _n not save
+               if(strlen(name) > 2 && name[0] == '_' && name[1] == 'n' && name[2] == '_')
+                       continue;
 
                if(developer_entityparsing.integer)
                        Con_Printf("PRVM_ED_WriteGlobals: at global %s\n", name);