From: Rudolf Polzer Date: Mon, 14 Nov 2011 05:55:21 +0000 (+0100) Subject: properly DRAW the local player X-Git-Tag: xonotic-v0.6.0~74^2~100^2~82 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=96240150e21d9a1389ae809a6e913a39fe37bc5f;p=xonotic%2Fxonotic-data.pk3dir.git properly DRAW the local player --- diff --git a/qcsrc/csqcmodel/cl_model.qc b/qcsrc/csqcmodel/cl_model.qc index f5519c2f6..791205bb3 100644 --- a/qcsrc/csqcmodel/cl_model.qc +++ b/qcsrc/csqcmodel/cl_model.qc @@ -143,7 +143,11 @@ void CSQCModel_InterpolateAnimation_Do() void CSQCModel_Draw() { - InterpolateOrigin_Do(); + // we don't do this for the local player as that one is already handled + // by CSQCPlayer_SetCamera() + if(!CSQCPlayer_IsLocalPlayer()) + InterpolateOrigin_Do(); + // TODO csqcplayers: run prediction here too CSQCModel_InterpolateAnimation_Do(); diff --git a/qcsrc/csqcmodel/cl_player.qc b/qcsrc/csqcmodel/cl_player.qc index eb1715c67..d22052416 100644 --- a/qcsrc/csqcmodel/cl_player.qc +++ b/qcsrc/csqcmodel/cl_player.qc @@ -100,6 +100,11 @@ void CSQCPlayer_PredictTo(float endframe) input_angles = view_angles; } +float CSQCPlayer_IsLocalPlayer() +{ + return (self == csqcplayer); +} + void CSQCPlayer_SetCamera() { if(csqcplayer) diff --git a/qcsrc/csqcmodel/cl_player.qh b/qcsrc/csqcmodel/cl_player.qh index 7f7329bd5..0eecabed8 100644 --- a/qcsrc/csqcmodel/cl_player.qh +++ b/qcsrc/csqcmodel/cl_player.qh @@ -28,3 +28,4 @@ float csqcplayer_status; void CSQCPlayer_SetCamera(); float CSQCPlayer_PreUpdate(); float CSQCPlayer_PostUpdate(); +float CSQCPlayer_IsLocalPlayer();