diff --git a/src/display.cpp b/src/display.cpp index 72357f90f84..b4ee42e9981 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -2060,7 +2060,7 @@ void display::invalidate_animations() for(int x = topleft.x; x <= bottomright.x; ++x) { for(int y = topleft.y; y <= bottomright.y; ++y) { gamemap::location loc(x,y); - if(builder_.update_animation(loc) || (map_.is_village(loc) && animate_flags)) { + if(builder_.update_animation(loc) || (map_.is_village(loc) && animate_flags && player_teams::village_owner(loc) != -1)) { invalidate(loc); } } diff --git a/src/team.cpp b/src/team.cpp index 98f439b645c..8fab2b43faa 100644 --- a/src/team.cpp +++ b/src/team.cpp @@ -986,3 +986,18 @@ void team::log_recruitable(){ } LOG_NG << "Added all recruitable units\n"; } + +namespace player_teams { +int village_owner(const gamemap::location& loc) +{ + if(! teams) { + return -1; + } + for(size_t i = 0; i != teams->size(); ++i) { + if((*teams)[i].owns_village(loc)) + return i; + } + return -1; +} +} + diff --git a/src/team.hpp b/src/team.hpp index 188a9c2f40f..d9561d6483a 100644 --- a/src/team.hpp +++ b/src/team.hpp @@ -276,6 +276,10 @@ struct teams_manager { bool is_observer(); }; +namespace player_teams { + int village_owner(const gamemap::location& loc); +} + bool is_observer(); //function which will validate a side. Trows game::game_error