Skip to content

Commit

Permalink
Split event names before filing handlers by name.
Browse files Browse the repository at this point in the history
Fixes bug #21577.
  • Loading branch information
Ja-MiT committed Feb 26, 2014
1 parent 5162b05 commit 7cb0f5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog
Expand Up @@ -9,6 +9,7 @@ Version 1.11.10+dev:
* WML engine:
* Bug #21643: Removing fog from a single hex no longer makes the hex ugly.
* WML files whose names contain spaces are ignored.
* Bug #21722: Event handlers with multiple names never fired.
* User interface:
* Non-team labels no longer remove team labels that were present in the
same hex.
Expand Down
7 changes: 5 additions & 2 deletions src/game_events/handlers.cpp
Expand Up @@ -191,8 +191,11 @@ namespace { // Types
// File by name.
if ( utils::might_contain_variables(name) )
dynamic_.push_back(new_handler);
else
by_name_[standardize_name(name)].push_back(new_handler);
else {
std::vector<std::string> name_list = utils::split(name);
BOOST_FOREACH( const std::string & single_name, name_list )
by_name_[standardize_name(single_name)].push_back(new_handler);
}
// File by ID.
if ( !id.empty() )
id_map_[id] = new_handler;
Expand Down

0 comments on commit 7cb0f5b

Please sign in to comment.