]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
When player re-spawns, copy the gun alignment from their old weapon entities (should...
authorMario <mario@smbclan.net>
Thu, 16 Feb 2017 05:22:09 +0000 (15:22 +1000)
committerMario <mario@smbclan.net>
Thu, 16 Feb 2017 05:22:09 +0000 (15:22 +1000)
qcsrc/server/client.qc

index 8c76503bf4802906a18d0b426a8fd041ce25b4ac..786104918cfcd34e81008050f888baf626d0f9bf 100644 (file)
@@ -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;