From: Mario Date: Mon, 3 Oct 2016 08:29:14 +0000 (+1000) Subject: Fix sometimes starting with 2 weapons X-Git-Tag: xonotic-v0.8.2~326^2~73^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3e8e6358c38740f7278b28d9c44c2c1e5f281ca0;p=xonotic%2Fxonotic-data.pk3dir.git Fix sometimes starting with 2 weapons --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index f936ef782..f6cb79a7d 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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;