]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix joining after spectating keeping the spectatee's gun alignment
authorMario <mario@smbclan.net>
Thu, 16 Feb 2017 07:02:00 +0000 (17:02 +1000)
committerMario <mario@smbclan.net>
Thu, 16 Feb 2017 07:02:00 +0000 (17:02 +1000)
qcsrc/server/client.qc

index ffd380810fec393f7607ea8615ee83a3fd6e268e..3ecac48855e7b0c8a274809c79298758b981dc35 100644 (file)
@@ -655,7 +655,7 @@ void PutClientInServer(entity this)
                        .entity weaponentity = weaponentities[slot];
                        entity oldwep = this.(weaponentity);
                        CL_SpawnWeaponentity(this, weaponentity);
-                       if(oldwep)
+                       if(oldwep && oldwep.owner == this)
                                this.(weaponentity).m_gunalign = oldwep.m_gunalign;
                }
                this.alpha = default_player_alpha;