From: Rudolf Polzer Date: Tue, 15 Nov 2011 10:36:50 +0000 (+0100) Subject: fix observing and most of spectating X-Git-Tag: xonotic-v0.6.0~74^2~100^2~58 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=259f44cb8bdfbf669cd97dab541f6474292f60f9;p=xonotic%2Fxonotic-data.pk3dir.git fix observing and most of spectating --- diff --git a/qcsrc/csqcmodel/cl_player.qc b/qcsrc/csqcmodel/cl_player.qc index 5d356a053..bfa8616f6 100644 --- a/qcsrc/csqcmodel/cl_player.qc +++ b/qcsrc/csqcmodel/cl_player.qc @@ -153,6 +153,11 @@ void CSQCPlayer_SetCamera() self.pmove_flags |= PMF_ONGROUND; else self.pmove_flags &~= PMF_ONGROUND; + + CSQCPlayer_SetMinsMaxs(); + + self.view_ofs_z = getstati(STAT_VIEWHEIGHT); + print(vtos(self.view_ofs), "\n"); } else { @@ -182,9 +187,9 @@ void CSQCPlayer_SetCamera() CSQCPlayer_SavePrediction(); } CSQCPlayer_PredictTo(clientcommandframe); - } - CSQCPlayer_SetMinsMaxs(); + CSQCPlayer_SetMinsMaxs(); + } // relink setorigin(self, self.origin); diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index cd18bc619..cd5bc3b65 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -570,16 +570,18 @@ void PutObserverInServer (void) self.fixangle = TRUE; self.crouch = FALSE; - self.view_ofs = '0 0 0'; // so that your view doesn't go into the ceiling with MOVETYPE_FLY_WORLDONLY, previously "PL_VIEW_OFS" setorigin (self, spot.origin); - setsize (self, PL_CROUCH_MIN, PL_CROUCH_MAX); // give the spectator some space between walls for MOVETYPE_FLY_WORLDONLY self.prevorigin = self.origin; self.items = 0; self.weapons = 0; self.model = ""; FixPlayermodel(); - self.model = ""; - self.modelindex = 0; + setmodel(self, "null"); + self.drawonlytoclient = self; + + setsize (self, PL_CROUCH_MIN, PL_CROUCH_MAX); // give the spectator some space between walls for MOVETYPE_FLY_WORLDONLY + self.view_ofs = '0 0 0'; // so that your view doesn't go into the ceiling with MOVETYPE_FLY_WORLDONLY, previously "PL_VIEW_OFS" + self.weapon = 0; self.weaponname = ""; self.switchingweapon = 0; @@ -894,6 +896,7 @@ void PutClientInServer (void) self.model = ""; FixPlayermodel(); + self.drawonlytoclient = world; self.crouch = FALSE; self.view_ofs = PL_VIEW_OFS;