From: Rudolf Polzer Date: Mon, 14 Nov 2011 09:15:40 +0000 (+0100) Subject: properly support toggling csqcplayer status X-Git-Tag: xonotic-v0.6.0~74^2~100^2~76 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=74156e70eb9d0c79b648cca990f5181d31779556;p=xonotic%2Fxonotic-data.pk3dir.git properly support toggling csqcplayer status --- diff --git a/qcsrc/csqcmodel/cl_player.qc b/qcsrc/csqcmodel/cl_player.qc index 31df6b7b1..ba93c2e8d 100644 --- a/qcsrc/csqcmodel/cl_player.qc +++ b/qcsrc/csqcmodel/cl_player.qc @@ -137,7 +137,7 @@ void CSQCPlayer_SetCamera() self = oldself; - org = csqcplayer.origin + '0 0 1' * getstatf(STAT_VIEWHEIGHT) + CSQCPlayer_GetPredictionError(); + org = csqcplayer.origin + '0 0 1' * getstati(STAT_VIEWHEIGHT) + CSQCPlayer_GetPredictionError(); ang = R_SetView3fv(VF_ANGLES); // simulate missing engine features @@ -157,11 +157,19 @@ void CSQCPlayer_SetCamera() } } +void CSQCPlayer_Remove() +{ + if(self.entnum != player_localentnum) + return; + csqcplayer = world; + cvar_clientsettemp("cl_movement_replay", "0"); +} + float CSQCPlayer_PreUpdate() { if(self.entnum != player_localentnum) return 0; - cvar_clientsettemp("cl_movement_replay", "0"); + cvar_clientsettemp("cl_movement_replay", "1"); if(csqcplayer_status != CSQCPLAYERSTATUS_FROMSERVER) CSQCPlayer_Unpredict(); return 1; @@ -177,6 +185,7 @@ float CSQCPlayer_PostUpdate() return 0; csqcplayer_status = CSQCPLAYERSTATUS_FROMSERVER; csqcplayer = self; + self.entremove = CSQCPlayer_Remove; return 1; }