Skip to content

Commit

Permalink
Merge pull request #36840 from park66665/fixitxenomedes
Browse files Browse the repository at this point in the history
Stop power armors and FB51 optical cloak from eating peoples energy while being inactive
  • Loading branch information
Rivet-the-Zombie committed Jan 9, 2020
2 parents 3731c9e + 10d7eba commit b8625b0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3291,12 +3291,14 @@ void player::process_items()
w.charges < w.type->maximum_charges() ) {
active_worn_items.push_back( &w );
}
if( cloak == nullptr && w.has_flag( "ACTIVE_CLOAKING" ) ) {
cloak = &w;
}
// Only the main power armor item can be active, the other ones (hauling frame, helmet) aren't.
if( power_armor == nullptr && w.is_power_armor() ) {
power_armor = &w;
if( w.active ) {
if( cloak == nullptr && w.has_flag( "ACTIVE_CLOAKING" ) ) {
cloak = &w;
}
// Only the main power armor item can be active, the other ones (hauling frame, helmet) aren't.
if( power_armor == nullptr && w.is_power_armor() ) {
power_armor = &w;
}
}
// Necessary for UPS in Aftershock - check worn items for charge
const itype_id &identifier = w.typeId();
Expand Down

0 comments on commit b8625b0

Please sign in to comment.