From: Mario Date: Thu, 8 Feb 2018 05:10:46 +0000 (+1000) Subject: Make sure auxiliary crosshairs are reset when observing/respawning X-Git-Tag: xonotic-v0.8.5~2337 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4b4ae633106bd9161eaa813b77124d6759678d06;p=xonotic%2Fxonotic-data.pk3dir.git Make sure auxiliary crosshairs are reset when observing/respawning --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 16908fcd3..749e59f14 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -357,6 +357,14 @@ void PutObserverInServer(entity this) //this.spawnpoint_targ = NULL; // keep it so they can return to where they were? + for(int slot = 0; slot < MAX_AXH; ++slot) + { + entity axh = this.(AuxiliaryXhair[slot]); + this.(AuxiliaryXhair[slot]) = NULL; + if(axh && axh.owner == this) + delete(axh); + } + this.weaponmodel = ""; for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { @@ -643,6 +651,14 @@ void PutPlayerInServer(entity this) this.spawnpoint_targ = NULL; + for(int slot = 0; slot < MAX_AXH; ++slot) + { + entity axh = this.(AuxiliaryXhair[slot]); + this.(AuxiliaryXhair[slot]) = NULL; + if(axh && axh.owner == this) + delete(axh); + } + this.crouch = false; this.view_ofs = STAT(PL_VIEW_OFS, this); setsize(this, STAT(PL_MIN, this), STAT(PL_MAX, this));