Skip to content

Commit

Permalink
Merge pull request #510 from gfgtdf/1.12
Browse files Browse the repository at this point in the history
add optional fire_event parameter to get_village
  • Loading branch information
gfgtdf committed Sep 27, 2015
2 parents 263f666 + 0f65847 commit df6a293
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/actions/move.cpp
Expand Up @@ -136,7 +136,7 @@ void move_unit_spectator::set_unit(const unit_map::const_iterator &u)
}


bool get_village(const map_location& loc, int side, int *action_timebonus)
bool get_village(const map_location& loc, int side, int *action_timebonus, bool fire_event)
{
std::vector<team> &teams = *resources::teams;
team *t = unsigned(side - 1) < teams.size() ? &teams[side - 1] : NULL;
Expand Down Expand Up @@ -174,7 +174,7 @@ bool get_village(const map_location& loc, int side, int *action_timebonus)
if (resources::screen != NULL) {
resources::screen->invalidate(loc);
}
return t->get_village(loc, old_owner_side);
return t->get_village(loc, old_owner_side, fire_event);
}

return false;
Expand Down
2 changes: 1 addition & 1 deletion src/actions/move.hpp
Expand Up @@ -96,7 +96,7 @@ class move_unit_spectator {
* Makes it so the village at the given location is owned by the given side.
* Returns true if getting the village triggered a mutating event.
*/
bool get_village(const map_location& loc, int side, int *time_bonus = NULL);
bool get_village(const map_location& loc, int side, int *time_bonus = NULL, bool fire_event = true);

/// Moves a unit across the board.
/// And enters the synced context.
Expand Down

0 comments on commit df6a293

Please sign in to comment.