]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_execprogram.h
Update extension description to prefer "ent" as the parameter name over "e"
[xonotic/darkplaces.git] / prvm_execprogram.h
index 256676e9bad58331d972bd2a2eadfc8c0deedbab..a6c45c98c47379dbada45e3111ef193b43626aa7 100644 (file)
@@ -1,3 +1,4 @@
+extern cvar_t prvm_garbagecollection_enable;
 // NEED to reset startst after calling this! startst may or may not be clobbered!
 #define ADVANCE_PROFILE_BEFORE_JUMP() \
        prog->xfunction->profile += (st - startst); \
                                // against a certain sort of repeated migration to earlier
                                // points in the scan that could otherwise result in the string
                                // being freed for being unused
-                               PRVM_GetString(prog, OPA->_int);
+                               if(prvm_garbagecollection_enable.integer)
+                                       PRVM_GetString(prog, OPA->_int);
                                OPB->_int = OPA->_int;
                        DISPATCH_OPCODE();
                        HANDLE_OPCODE(OP_STORE_V):
                                // against a certain sort of repeated migration to earlier
                                // points in the scan that could otherwise result in the string
                                // being freed for being unused
-                               PRVM_GetString(prog, OPA->_int);
+                               if(prvm_garbagecollection_enable.integer)
+                                       PRVM_GetString(prog, OPA->_int);
                                ptr = (prvm_eval_t *)(cached_edictsfields + OPB->_int);
                                ptr->_int = OPA->_int;
                                DISPATCH_OPCODE();