Skip to content

Commit

Permalink
Made "unit placed" events respect [unstore_unit] fire_event=
Browse files Browse the repository at this point in the history
  • Loading branch information
ln-zookeeper committed Mar 1, 2016
1 parent a72afff commit 1a70c37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/game_events/action_wml.cpp
Expand Up @@ -1335,7 +1335,9 @@ WML_HANDLER_FUNCTION(unstore_unit, /*event_info*/, cfg)
resources::units->erase(loc);
resources::units->add(loc, *u);

resources::game_events->pump().fire("unit placed", loc);
if (cfg["fire_event"].to_bool(false)) {
resources::game_events->pump().fire("unit placed", loc);
}

config::attribute_value text = var["gender"].str() == "female" ? cfg["female_text"] : cfg["male_text"];
if(text.blank()) {
Expand Down

0 comments on commit 1a70c37

Please sign in to comment.