From 4b4ae633106bd9161eaa813b77124d6759678d06 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 8 Feb 2018 15:10:46 +1000 Subject: [PATCH] Make sure auxiliary crosshairs are reset when observing/respawning --- qcsrc/server/client.qc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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)); -- 2.39.2