]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Reset viewloc when respawning, and link it with spectatee (should fix spectating...
authorMario <mario@smbclan.net>
Tue, 11 Oct 2016 17:00:41 +0000 (03:00 +1000)
committerMario <mario@smbclan.net>
Tue, 11 Oct 2016 17:00:41 +0000 (03:00 +1000)
qcsrc/server/client.qc

index ad7b4e8fbc6f751e973b1a917c978ff2c1d7bd46..1735a78be8988464792f97b17c52af798d6678af 100644 (file)
@@ -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);