Make SBARINFO's HasWeaponPiece recognize removed pieces

- Fixed: HasWeaponPiece assumed that once a piece was given, it would not
  be removed. The easiest way to break this assumption is by loading an
  earlier save where you had fewer pieces. (The catch being that if you
  removed all pieces, it would notice that.)
This commit is contained in:
Randy Heit 2015-02-24 20:01:39 -06:00
parent 5f43e5b4ea
commit a41af2de73

View file

@ -3069,8 +3069,7 @@ class CommandHasWeaponPiece : public SBarInfoCommandFlowControl
AWeaponHolder *hold = static_cast<AWeaponHolder*>(inv);
if(hold->PieceWeapon == weapon)
{
if(hold->PieceMask & (1 << (piece-1)))
SetTruth(true, block, statusBar);
SetTruth(0 != (hold->PieceMask & (1 << (piece-1))), block, statusBar);
return;
}
}