From de98e2a8b4ccdcc60b39eefa9cabf6085e0b2b05 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 4 Dec 2011 14:48:14 +0000 Subject: [PATCH] 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 --- csprogs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.39.2