From a91b45035f3622d68a036da4eea2ceec90410adc Mon Sep 17 00:00:00 2001 From: dresk Date: Fri, 27 Jul 2007 22:53:09 +0000 Subject: [PATCH] Reverted addition of float global intermission to clprogdefs.h (which required a CRC update and recompilation of all CSQC mods). Revert changes to CSQC Defs file if intermission had been inserted into it. 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 | 1 + clprogdefs.h | 3 +-- csprogs.c | 5 ++++- progsvm.h | 1 + prvm_edict.c | 1 + 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cl_parse.c b/cl_parse.c index b304a756..bf145348 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -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); /* ================== diff --git a/clprogdefs.h b/clprogdefs.h index 9145da99..b9354fbb 100644 --- a/clprogdefs.h +++ b/clprogdefs.h @@ -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 diff --git a/csprogs.c b/csprogs.c index 06bcea59..7f063c9f 100644 --- 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 } } diff --git a/progsvm.h b/progsvm.h index 226a6120..c3346e3a 100644 --- 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; diff --git a/prvm_edict.c b/prvm_edict.c index 22bf8846..555eaa29 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -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"); -- 2.39.2