Skip to content

Commit

Permalink
fix repair bionic consumption
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirmuolio committed Jul 7, 2021
1 parent 4918671 commit 7e62c9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8949,7 +8949,7 @@ bool Character::consume_charges( item &used, int qty )
return true;
}

used.ammo_consume( qty, pos(), nullptr );
used.ammo_consume( qty, pos(), this );
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8000,7 +8000,7 @@ int item::ammo_consume( int qty, const tripoint &pos, Character *carrier )
// Consume bio pwr directly
if( carrier != nullptr && has_flag( flag_USES_BIONIC_POWER ) ) {
int bio_used = std::min( units::to_kilojoule( carrier->get_power_level() ), qty );
carrier->mod_power_level( units::from_kilojoule( bio_used ) );
carrier->mod_power_level( -units::from_kilojoule( bio_used ) );
qty -= bio_used;
}

Expand Down

0 comments on commit 7e62c9f

Please sign in to comment.