Skip to content

Commit

Permalink
Revert "Allow modifying dead units in more event handlers"
Browse files Browse the repository at this point in the history
This reverts commit 9110e49.
  • Loading branch information
jyrkive committed May 28, 2018
1 parent 019848a commit 70be1d2
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/actions/attack.cpp
Expand Up @@ -1195,24 +1195,17 @@ bool attack::perform_hit(bool attacker_turn, statistics::attack_context& stats)
OOS_error_ = true;
}

if(dies) {
// Will be reset in unit_killed() later.
unit::dying_unit_loc = defender.loc_;
}

if(hits) {
try {
fire_event(attacker_turn ? "attacker_hits" : "defender_hits");
} catch(const attack_end_exception&) {
unit::dying_unit_loc = map_location::null_location();
refresh_bc();
return false;
}
} else {
try {
fire_event(attacker_turn ? "attacker_misses" : "defender_misses");
} catch(const attack_end_exception&) {
unit::dying_unit_loc = map_location::null_location();
refresh_bc();
return false;
}
Expand Down

0 comments on commit 70be1d2

Please sign in to comment.