Fixed attack_end fire inanycase
This commit is contained in:
parent
577a5671d1
commit
893ce898bc
1 changed files with 2 additions and 10 deletions
|
@ -739,10 +739,6 @@ void attack::fire_event(const std::string& n)
|
|||
(*(dat.child("first")))["weapon"]=a_stats_->weapon->id();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
a_id_ = "";
|
||||
}
|
||||
if(d_ != units_.end()) {
|
||||
config *tempcfg = dat.child("second");
|
||||
t_string d_weap = "none";
|
||||
|
@ -757,15 +753,11 @@ void attack::fire_event(const std::string& n)
|
|||
std::pair<std::string,t_string> to_insert("weapon", d_weap);
|
||||
tempcfg->values.insert(to_insert);
|
||||
}
|
||||
else
|
||||
{
|
||||
d_id_ = "";
|
||||
}
|
||||
|
||||
// We want to fire attack_end event in any case! Even if one of units was removed by WML
|
||||
DELAY_END_LEVEL(delayed_exception, game_events::fire(n,
|
||||
game_events::entity_location(attacker_,a_id_),
|
||||
game_events::entity_location(defender_,d_id_), dat));
|
||||
attacker_,
|
||||
defender_, dat));
|
||||
a_ = units_.find(attacker_);
|
||||
d_ = units_.find(defender_);
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue