From 61752189ad84d715cf54fd94cd7ba1402ff6f995 Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 7 Jul 2011 09:29:03 +0000 Subject: [PATCH] Make sure those fields are initialised. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3849 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/pr_q1qvm.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/engine/server/pr_q1qvm.c b/engine/server/pr_q1qvm.c index 339a95f1b..b4db1d0b9 100755 --- a/engine/server/pr_q1qvm.c +++ b/engine/server/pr_q1qvm.c @@ -1394,6 +1394,7 @@ qboolean PR_LoadQ1QVM(void) #define globalstring(required, name) pr_nqglobal_struct->name = (string_t*)((char*)VM_MemoryBase(q1qvm)+(qintptr_t)&gd->global->name) #define globalvec(required, name) pr_nqglobal_struct->V_##name = (vec3_t*)((char*)VM_MemoryBase(q1qvm)+(qintptr_t)&gd->global->name) #define globalfunc(required, name) pr_nqglobal_struct->name = (int*)((char*)VM_MemoryBase(q1qvm)+(qintptr_t)&gd->global->name) +#define globalfloatnull(required, name) pr_nqglobal_struct->name = NULL globalint (true, self); //we need the qw ones, but any in standard quake and not quakeworld, we don't really care about. globalint (true, other); globalint (true, world); @@ -1402,9 +1403,9 @@ qboolean PR_LoadQ1QVM(void) globalint (false, newmis); //not always in nq. globalfloat (false, force_retouch); globalstring (true, mapname); -// globalfloat (false, deathmatch); -// globalfloat (false, coop); -// globalfloat (false, teamplay); + globalfloatnull (false, deathmatch); + globalfloatnull (false, coop); + globalfloatnull (false, teamplay); globalfloat (true, serverflags); globalfloat (true, total_secrets); globalfloat (true, total_monsters); @@ -1422,9 +1423,9 @@ qboolean PR_LoadQ1QVM(void) globalint (true, trace_ent); globalfloat (true, trace_inopen); globalfloat (true, trace_inwater); -// globalfloat (false, trace_endcontents); -// globalfloat (false, trace_surfaceflags); -// globalfloat (false, cycle_wrapped); + globalfloatnull (false, trace_endcontents); + globalfloatnull (false, trace_surfaceflags); + globalfloatnull (false, cycle_wrapped); globalint (false, msg_entity); globalfunc (false, main); globalfunc (true, StartFrame);