stop flags flickering from time to time

This commit is contained in:
Jérémy Rosen 2006-02-12 22:48:26 +00:00
parent ca26e6f625
commit 2a08ff5822
2 changed files with 6 additions and 1 deletions

View File

@ -20,6 +20,7 @@ SVN trunk (1.1.1+svn):
* Send message on player ban or kick
* Show a message when a player leaves a game.
* WML-generated units with "random_traits" now show the traits description
* flags on village don't "flicker" at the end of their animations
* graphics
* new attack icons: animal fangs, axe, battle axe, faery touch, fireball, hammer, hatchet, lightbeam, magic missile, necromatic staff, magic staff, spear

View File

@ -1998,7 +1998,11 @@ surface display::get_flag(gamemap::TERRAIN terrain, int x, int y)
for(size_t i = 0; i != teams_.size(); ++i) {
if(teams_[i].owns_village(loc) && (!fogged(x,y) || !shrouded(x,y) && !teams_[currentTeam_].is_enemy(i+1))) {
return image::get_image(flags_[i].get_current_frame());
if(image::get_image(flags_[i].get_current_frame())) {
return image::get_image(flags_[i].get_current_frame());
} else {
return image::get_image(flags_[i].get_first_frame());
}
}
}