]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
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 b304a756c59486dadec924d0ca0d4545bca33e3e..bf145348484de7e1b5d3845875709bc3d6094778 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 9145da99a04bfddf7f0cfa10a41b7b610c20bd1f..b9354fbb599895ee3c2058345b5efdd6fbc1d58b 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 06bcea592f03305525f011898cc64ef7cc64d6e5..7f063c9f40b67733b499cb1ea6cbd867bca839ca 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 226a6120826910c70e066150a8a8da68e2d00c08..c3346e3af7568ce39bcfa12eaf4dee2324bcfb1d 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 22bf88460188e36a545f722e50befa283f36d001..555eaa2918ec181d206dfb89628003db1c6e7dca 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");