The reason why this happens is that the current implementation may consider the same sequence of weapons twice when trying to find an appropriate weapon that corresponds to the requested slot.
Suggested resolution:
In class Engine.Weapon, add new variable
Code: Select all
var transient bool bBreakWeaponChange;
Code: Select all
function Weapon WeaponChange( byte F )
{
local Weapon newWeapon;
+ if (bBreakWeaponChange)
+ return none;
+
if ( InventoryGroup == F )
Code: Select all
if ( Inventory == None )
return;
- if ( (Weapon != None) && (Weapon.Inventory != None) )
- newWeapon = Weapon.Inventory.WeaponChange(F);
- else
- newWeapon = None;
- if ( newWeapon == None )
- newWeapon = Inventory.WeaponChange(F);
+
+ if (Weapon != none && Weapon.Inventory != none)
+ {
+ newWeapon = Weapon.Inventory.WeaponChange(F);
+ if (newWeapon == none)
+ {
+ Weapon.bBreakWeaponChange = true;
+ newWeapon = Inventory.WeaponChange(F);
+ Weapon.bBreakWeaponChange = false;
+ }
+ }
+ else
+ newWeapon = Inventory.WeaponChange(F);
+
if ( newWeapon == None )
return;