From: Mario Date: Thu, 16 Feb 2017 05:22:09 +0000 (+1000) Subject: When player re-spawns, copy the gun alignment from their old weapon entities (should... X-Git-Tag: xonotic-v0.8.2~206 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9b017dd54aa032031cf6a923526883789791a579;p=xonotic%2Fxonotic-data.pk3dir.git When player re-spawns, copy the gun alignment from their old weapon entities (should fix an issue with gun alignment when map is reset) --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 8c76503bf..786104918 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -653,7 +653,10 @@ void PutClientInServer(entity this) for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { .entity weaponentity = weaponentities[slot]; + entity oldwep = this.(weaponentity); CL_SpawnWeaponentity(this, weaponentity); + if(oldwep) + this.(weaponentity).m_gunalign = oldwep.m_gunalign; } this.alpha = default_player_alpha; this.colormod = '1 1 1' * autocvar_g_player_brightness;