From: Mario Date: Tue, 11 Oct 2016 17:00:41 +0000 (+1000) Subject: Reset viewloc when respawning, and link it with spectatee (should fix spectating... X-Git-Tag: xonotic-v0.8.2~526 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e878c57099a1215e3452c81c59ab475e4b5bb35e;p=xonotic%2Fxonotic-data.pk3dir.git Reset viewloc when respawning, and link it with spectatee (should fix spectating sidescrollers) --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index ad7b4e8fb..1735a78be 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -625,6 +625,8 @@ void PutClientInServer(entity this) FixPlayermodel(this); this.drawonlytoclient = NULL; + this.viewloc = NULL; + this.crouch = false; this.view_ofs = STAT(PL_VIEW_OFS, this); setsize(this, STAT(PL_MIN, this), STAT(PL_MAX, this)); @@ -1672,6 +1674,7 @@ void SpectateCopy(entity this, entity spectatee) this.angles = spectatee.v_angle; STAT(FROZEN, this) = STAT(FROZEN, spectatee); this.revive_progress = spectatee.revive_progress; + this.viewloc = spectatee.viewloc; if(!PHYS_INPUT_BUTTON_USE(this) && STAT(CAMERA_SPECTATOR, this) != 2) this.fixangle = true; setorigin(this, spectatee.origin);