From a41af2de7391ac1b96b5faf24d11ac24792607fa Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 24 Feb 2015 20:01:39 -0600 Subject: [PATCH] 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.) --- src/g_shared/sbarinfo_commands.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/g_shared/sbarinfo_commands.cpp b/src/g_shared/sbarinfo_commands.cpp index ce94b2bc23..bb1b048502 100644 --- a/src/g_shared/sbarinfo_commands.cpp +++ b/src/g_shared/sbarinfo_commands.cpp @@ -3069,8 +3069,7 @@ class CommandHasWeaponPiece : public SBarInfoCommandFlowControl AWeaponHolder *hold = static_cast(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; } }