]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix sometimes starting with 2 weapons
authorMario <mario@smbclan.net>
Mon, 3 Oct 2016 08:29:14 +0000 (18:29 +1000)
committerMario <mario@smbclan.net>
Mon, 3 Oct 2016 08:29:14 +0000 (18:29 +1000)
qcsrc/server/client.qc

index f936ef782d0a655cf0f583672d9457ed4c02d317..f6cb79a7dce3d44badc978dfc73c29d1b47ac9c1 100644 (file)
@@ -656,7 +656,8 @@ void PutClientInServer(entity this)
 
                for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                {
-                       CL_SpawnWeaponentity(this, weaponentities[slot]);
+                       .entity weaponentity = weaponentities[slot];
+                       CL_SpawnWeaponentity(this, weaponentity);
                }
                this.alpha = default_player_alpha;
                this.colormod = '1 1 1' * autocvar_g_player_brightness;
@@ -703,6 +704,7 @@ void PutClientInServer(entity this)
                                this.(weaponentity).m_switchweapon = w_getbestweapon(this, weaponentity);
                        else
                                this.(weaponentity).m_switchweapon = WEP_Null;
+                       this.(weaponentity).m_weapon = WEP_Null;
                        this.(weaponentity).weaponname = "";
                        this.(weaponentity).m_switchingweapon = WEP_Null;
                        this.(weaponentity).cnt = -1;