]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_exec.c
allow calls to drawstring without the flag parameter, as per CSQC spec
[xonotic/darkplaces.git] / prvm_exec.c
index d53b2139f3162fd6af983daa8779445ad04538b7..8fb0d69254722617045db75231ebb23c047bbf99 100644 (file)
@@ -523,7 +523,7 @@ void PRVM_Crash(void)
        if (prog == NULL)
                return;
 
-       prog->funcoffsets.SV_Shutdown = 0; // don't call SV_Shutdown on crash
+       PRVM_serverfunction(SV_Shutdown) = 0; // don't call SV_Shutdown on crash
 
        if( prog->depth > 0 )
        {
@@ -694,8 +694,8 @@ void MVM_ExecuteProgram (func_t fnum, const char *errormessage)
 
        if (!fnum || fnum >= (unsigned int)prog->numfunctions)
        {
-               if (prog->globaloffsets.self >= 0 && PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self))
-                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self)), NULL);
+               if (PRVM_allglobaledict(self))
+                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_allglobaledict(self)), NULL);
                PRVM_ERROR ("MVM_ExecuteProgram: %s", errormessage);
        }
 
@@ -783,8 +783,8 @@ void CLVM_ExecuteProgram (func_t fnum, const char *errormessage)
 
        if (!fnum || fnum >= (unsigned int)prog->numfunctions)
        {
-               if (prog->globaloffsets.self >= 0 && PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self))
-                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self)), NULL);
+               if (PRVM_allglobaledict(self))
+                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_allglobaledict(self)), NULL);
                PRVM_ERROR ("CLVM_ExecuteProgram: %s", errormessage);
        }
 
@@ -873,8 +873,8 @@ void SVVM_ExecuteProgram (func_t fnum, const char *errormessage)
 
        if (!fnum || fnum >= (unsigned int)prog->numfunctions)
        {
-               if (prog->globaloffsets.self >= 0 && PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self))
-                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self)), NULL);
+               if (PRVM_allglobaledict(self))
+                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_allglobaledict(self)), NULL);
                PRVM_ERROR ("SVVM_ExecuteProgram: %s", errormessage);
        }