From 96240150e21d9a1389ae809a6e913a39fe37bc5f Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 14 Nov 2011 06:55:21 +0100 Subject: [PATCH] properly DRAW the local player --- qcsrc/csqcmodel/cl_model.qc | 6 +++++- qcsrc/csqcmodel/cl_player.qc | 5 +++++ qcsrc/csqcmodel/cl_player.qh | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) 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(); -- 2.39.2