From 0cdaa0b22f6efefe99e163e5509ec944b66abb4d Mon Sep 17 00:00:00 2001 From: black Date: Wed, 27 Feb 2008 22:59:43 +0000 Subject: [PATCH] I must have been smoking cannabis when I wrote this (a pity I dont smoke cannabis). Fix CSQC_Ent_Spawn handling. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8154 d7cf8633-e32d-0410-b094-e92efae38249 --- csprogs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csprogs.c b/csprogs.c index 670ec099..525f497a 100644 --- a/csprogs.c +++ b/csprogs.c @@ -566,8 +566,6 @@ void CSQC_ReadEntities (void) ed = PRVM_ED_Alloc(); ed->fields.client->entnum = realentnum; prog->globals.client->self = cl.csqc_server2csqcentitynumber[realentnum] = PRVM_EDICT_TO_PROG(ed); - PRVM_G_FLOAT(OFS_PARM0) = 1; - PRVM_ExecuteProgram(prog->funcoffsets.CSQC_Ent_Update, "QC function CSQC_Ent_Update is missing"); } else { @@ -577,8 +575,10 @@ void CSQC_ReadEntities (void) // make sure no one gets wrong ideas prog->globals.client->self = 0; PRVM_ExecuteProgram(prog->funcoffsets.CSQC_Ent_Spawn, "QC function CSQC_Ent_Spawn is missing"); - cl.csqc_server2csqcentitynumber[realentnum] = PRVM_EDICT( PRVM_G_INT( OFS_RETURN ) ); + prog->globals.client->self = cl.csqc_server2csqcentitynumber[realentnum] = PRVM_EDICT( PRVM_G_INT( OFS_RETURN ) ); } + PRVM_G_FLOAT(OFS_PARM0) = 1; + PRVM_ExecuteProgram(prog->funcoffsets.CSQC_Ent_Update, "QC function CSQC_Ent_Update is missing"); } else { PRVM_G_FLOAT(OFS_PARM0) = 0; -- 2.39.2