]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
properly DRAW the local player
authorRudolf Polzer <divverent@xonotic.org>
Mon, 14 Nov 2011 05:55:21 +0000 (06:55 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 14 Nov 2011 05:55:21 +0000 (06:55 +0100)
qcsrc/csqcmodel/cl_model.qc
qcsrc/csqcmodel/cl_player.qc
qcsrc/csqcmodel/cl_player.qh

index f5519c2f61099f45e6353b02e914e86bf401342e..791205bb33f4a7807889ab5942e1d9ce35c455e3 100644 (file)
@@ -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();
 
index eb1715c677a102cbfd79a7195d1e26b54be6a9b6..d220524161a18826946b5890c282398aecd3343b 100644 (file)
@@ -100,6 +100,11 @@ void CSQCPlayer_PredictTo(float endframe)
        input_angles = view_angles;
 }
 
+float CSQCPlayer_IsLocalPlayer()
+{
+       return (self == csqcplayer);
+}
+
 void CSQCPlayer_SetCamera()
 {
        if(csqcplayer)
index 7f7329bd54cb5560365a805184cfa75e68c3d6cc..0eecabed88e05e626d5be5a98799480de7bc4a21 100644 (file)
@@ -28,3 +28,4 @@ float csqcplayer_status;
 void CSQCPlayer_SetCamera();
 float CSQCPlayer_PreUpdate();
 float CSQCPlayer_PostUpdate();
+float CSQCPlayer_IsLocalPlayer();