Reverted addition of float global intermission to clprogdefs.h (which required a...
authordresk <dresk@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 27 Jul 2007 22:53:09 +0000 (22:53 +0000)
committerdresk <dresk@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 27 Jul 2007 22:53:09 +0000 (22:53 +0000)
CSQC updating of intermission still supported if float global intermission exists.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7496 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
clprogdefs.h
csprogs.c
progsvm.h
prvm_edict.c

index b304a75..bf14534 100644 (file)
@@ -182,6 +182,7 @@ static void QW_CL_NextUpload(void);
 void QW_CL_StartUpload(unsigned char *data, int size);
 //static qboolean QW_CL_IsUploading(void);
 static void QW_CL_StopUpload(void);
+void CL_VM_UpdateIntermissionState(int intermission);
 
 /*
 ==================
index 9145da9..b9354fb 100644 (file)
@@ -17,7 +17,6 @@ typedef struct cl_globalvars_s
        float           maxclients;
        float           clientcommandframe;
        float           servercommandframe;
-       float           intermission;
        string_t        mapname;
        vec3_t          v_forward;
        vec3_t          v_up;
@@ -92,6 +91,6 @@ typedef struct cl_entvars_s
        int                     owner;
 } cl_entvars_t;
 
-#define CL_PROGHEADER_CRC 49165
+#define CL_PROGHEADER_CRC 52195
 
 #endif
index 06bcea5..7f063c9 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -402,10 +402,13 @@ void CL_VM_Parse_CenterPrint (const char *msg)
 
 void CL_VM_UpdateIntermissionState (int intermission)
 {
+       prvm_eval_t *val;
        if(cl.csqc_loaded)
        {
                CSQC_BEGIN
-               prog->globals.client->intermission = intermission; // Dresk : This global is required and part of the CRC verification, so no check is required for it.
+               val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.intermission);
+               if(val)
+                       val->_float = intermission;
                CSQC_END
        }
 }
index 226a612..c3346e3 100644 (file)
--- a/progsvm.h
+++ b/progsvm.h
@@ -236,6 +236,7 @@ typedef struct prvm_prog_globaloffsets_s
        int trace_dphitq3surfaceflags; // ssqc / csqc
        int trace_dphittexturename; // ssqc / csqc
        int trace_dpstartcontents; // ssqc / csqc
+       int intermission; // csqc
 }
 prvm_prog_globaloffsets_t;
 
index 22bf884..555eaa2 100644 (file)
@@ -1440,6 +1440,7 @@ void PRVM_FindOffsets(void)
        prog->globaloffsets.trace_dphitq3surfaceflags     = PRVM_ED_FindGlobalOffset("trace_dphitq3surfaceflags");
        prog->globaloffsets.trace_dphittexturename        = PRVM_ED_FindGlobalOffset("trace_dphittexturename");
        prog->globaloffsets.trace_dpstartcontents         = PRVM_ED_FindGlobalOffset("trace_dpstartcontents");
+       prog->globaloffsets.intermission                  = PRVM_ED_FindGlobalOffset("intermission");
 
        // menu qc only uses some functions, nothing else
        prog->funcoffsets.m_display                       = PRVM_ED_FindFunctionOffset("m_display");