Revert "Allow modifying dead units in more event handlers"
This reverts commit b0c1382693
.
This commit is contained in:
parent
7be39c937d
commit
8fbf58e10a
1 changed files with 0 additions and 7 deletions
|
@ -1199,16 +1199,10 @@ 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;
|
||||
}
|
||||
|
@ -1216,7 +1210,6 @@ bool attack::perform_hit(bool attacker_turn, statistics::attack_context& stats)
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue