]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
I must have been smoking cannabis when I wrote this (a pity I dont smoke cannabis...
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2008 22:59:43 +0000 (22:59 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2008 22:59:43 +0000 (22:59 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8154 d7cf8633-e32d-0410-b094-e92efae38249

csprogs.c

index 670ec099b19ae26743eb7c1bb95607e99d3d88aa..525f497aa6243d354ae19fb3be22a86b872933fa 100644 (file)
--- 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;