Author: alink
Date: Fri Apr 13 21:10:36 2007
New Revision: 16810

URL: http://svn.gna.org/viewcvs/wesnoth?rev=16810&view=rev
Log:
Revert some optimization (instead of finishing it): not synchronize the flag 
animation between different team

Modified:
    trunk/src/display.cpp

Modified: trunk/src/display.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.cpp?rev=16810&r1=16809&r2=16810&view=diff
==============================================================================
--- trunk/src/display.cpp (original)
+++ trunk/src/display.cpp Fri Apr 13 21:10:36 2007
@@ -2149,18 +2149,16 @@
        gamemap::location topleft;
        gamemap::location bottomright;
        get_visible_hex_bounds(topleft, bottomright);
-       // flags are synchronized so we check only the first flag
-       bool update_flags = flags_[0].need_update();
-
+       
        for(int x = topleft.x; x <= bottomright.x; ++x) {
                for(int y = topleft.y; y <= bottomright.y; ++y) {
                        if (!shrouded(x,y)) {
                                gamemap::location loc(x,y);
                                if (builder_.update_animation(loc)) {
                                        invalidate(loc);
-                               } else if (update_flags && 
map_.is_village(loc)) {
+                               } else if (map_.is_village(loc)) {
                                        const int owner = 
player_teams::village_owner(loc);
-                                       if (owner >= 0 && (!fogged(x,y) || 
!teams_[currentTeam_].is_enemy(owner+1)))
+                                       if (owner >= 0 && 
flags_[owner].need_update() && (!fogged(x,y) || 
!teams_[currentTeam_].is_enemy(owner+1)))
                                                invalidate(loc);
                                }
                        }


_______________________________________________
Wesnoth-commits mailing list
[EMAIL PROTECTED]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to