Advertisement
dominus

Untitled

Feb 22nd, 2022
1,770
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.80 KB | None | 0 0
  1. iff --git a/combat.cc b/combat.cc
  2. index 55c5fff2..89889696 100644
  3. --- a/combat.cc
  4. +++ b/combat.cc
  5. @@ -821,6 +821,15 @@ void Combat_schedule::start_strike(
  6.  ) {
  7.     Game_object *opponent = npc->get_target();
  8.     bool check_lof = !no_blocking;
  9. +
  10. +   // don't attack but open unlocked doors and containers
  11. +   const Shape_info &op_info = opponent->get_info();
  12. +   const Shape_info::Shape_class op_cls = op_info.get_shape_class();
  13. +   if ((op_info.is_door() && opponent->get_framenum() % 4 < 2) || // unlocked door
  14. +           (op_cls == Shape_info::container && !op_info.is_container_locked())) { // unlocked container
  15. +       opponent->activate();
  16. +       return;}
  17. +
  18.     // Get difference in lift.
  19.     const Weapon_info *winf = weapon_shape >= 0 ?
  20.                         ShapeID::get_info(weapon_shape).get_weapon_info() : nullptr;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement