From: divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Mon, 14 Nov 2011 20:42:20 +0000 (+0000)
Subject: ground R_CalcRefdef when the player entity is shared
X-Git-Tag: xonotic-v0.6.0~163^2~2
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3daa2af221a54912514ea0d751b7b4514b644c67;p=xonotic%2Fdarkplaces.git

ground R_CalcRefdef when the player entity is shared

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11557 d7cf8633-e32d-0410-b094-e92efae38249
---

diff --git a/client.h b/client.h
index 8fe40a81..f28e5adb 100644
--- 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 0db5c012..d42a728f 100644
--- 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);
 	}
 }