From 9b017dd54aa032031cf6a923526883789791a579 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 16 Feb 2017 15:22:09 +1000 Subject: [PATCH] When player re-spawns, copy the gun alignment from their old weapon entities (should fix an issue with gun alignment when map is reset) --- qcsrc/server/client.qc | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.2