ground R_CalcRefdef when the player entity is shared
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 14 Nov 2011 20:42:20 +0000 (20:42 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 14 Nov 2011 20:42:20 +0000 (20:42 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11557 d7cf8633-e32d-0410-b094-e92efae38249

client.h
view.c

index 8fe40a8..f28e5ad 100644 (file)
--- a/client.h
+++ b/client.h
@@ -1889,6 +1889,7 @@ void SCR_CaptureVideo_SoundFrame(const portable_sampleframe_t *paintbuffer, size
 void V_DriftPitch(void);
 void V_FadeViewFlashs(void);
 void V_CalcViewBlend(void);
+void V_CalcRefdefUsing(const matrix4x4_t *entrendermatrix, const vec3_t clviewangles, qboolean teleported, qboolean clonground, qboolean clcmdjump);
 void V_CalcRefdef(void);
 void CL_Locs_Reload_f(void);
 
diff --git a/view.c b/view.c
index 0db5c01..d42a728 100644 (file)
--- a/view.c
+++ b/view.c
@@ -827,7 +827,7 @@ void V_CalcRefdef (void)
 {
        entity_t *ent;
 
-       if (cls.state == ca_connected && cls.signon == SIGNONS)
+       if (cls.state == ca_connected && cls.signon == SIGNONS && !cl.csqc_server2csqcentitynumber[cl.playerentity])
        {
                // ent is the view entity (visible when out of body)
                ent = &cl.entities[cl.viewentity];
@@ -839,6 +839,8 @@ void V_CalcRefdef (void)
                viewmodelmatrix_nobob = identitymatrix;
                viewmodelmatrix_withbob = identitymatrix;
                r_refdef.view.matrix = identitymatrix;
+               VectorClear(cl.csqc_vieworiginfromengine);
+               VectorCopy(cl.viewangles, cl.csqc_viewanglesfromengine);
        }
 }