From: divverent Date: Sun, 4 Dec 2011 14:48:14 +0000 (+0000) Subject: make player_localnum and player_localentnum conform to FTEQW X-Git-Tag: xonotic-v0.6.0~127 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=de98e2a8b4ccdcc60b39eefa9cabf6085e0b2b05;p=xonotic%2Fdarkplaces.git make player_localnum and player_localentnum conform to FTEQW git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11595 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=69b2e090578bc5bed3c9005c94df1b71330fe3ae --- diff --git a/csprogs.c b/csprogs.c index 9046b2be..a99c469b 100644 --- a/csprogs.c +++ b/csprogs.c @@ -249,6 +249,8 @@ static void CSQC_SetGlobals (void) VectorCopy(cl.punchvector, PRVM_clientglobalvector(view_punchvector)); PRVM_clientglobalfloat(maxclients) = cl.maxclients; + PRVM_clientglobalfloat(player_localentnum) = cl.viewentity; + CSQC_R_RecalcView(); CSQC_END } @@ -1134,7 +1136,8 @@ void CL_VM_Init (void) PRVM_clientglobaledict(self) = 0; PRVM_clientglobalstring(mapname) = PRVM_SetEngineString(prog, cl.worldname); - PRVM_clientglobalfloat(player_localentnum) = cl.playerentity; + PRVM_clientglobalfloat(player_localnum) = cl.realplayerentity - 1; + PRVM_clientglobalfloat(player_localentnum) = cl.viewentity; // set map description (use world entity 0) PRVM_clientedictstring(prog->edicts, message) = PRVM_SetEngineString(prog, cl.worldmessage);