wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src ai.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src ai.cpp
Date: Mon, 30 May 2005 02:39:15 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    05/05/30 06:39:15

Modified files:
        src            : ai.cpp 

Log message:
        fixed bug where saving in the middle of an AI unit's turn caused that 
unit to disappear

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/ai.cpp.diff?tr1=1.150&tr2=1.151&r1=text&r2=text

Patches:
Index: wesnoth/src/ai.cpp
diff -u wesnoth/src/ai.cpp:1.150 wesnoth/src/ai.cpp:1.151
--- wesnoth/src/ai.cpp:1.150    Thu May  5 22:24:40 2005
+++ wesnoth/src/ai.cpp  Mon May 30 06:39:15 2005
@@ -1,4 +1,4 @@
-/* $Id: ai.cpp,v 1.150 2005/05/05 22:24:40 ott Exp $ */
+/* $Id: ai.cpp,v 1.151 2005/05/30 06:39:15 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -465,10 +465,13 @@
                                        info_.disp.set_paths(&current_paths);
                                }
 
-                               
info_.disp.scroll_to_tiles(from.x,from.y,to.x,to.y);
-                               info_.units.erase(u_it);
-                               u_it = info_.units.end();
-                               
unit_display::move_unit(info_.disp,info_.map,steps,current_unit,info_.state.get_time_of_day(),info_.units,info_.teams);
+                               
info_.disp.scroll_to_tiles(from.x,from.y,to.x,to.y);
+
+                               info_.disp.hide_unit(u_it->first);
+                               
unit_display::move_unit(info_.disp,info_.map,steps,current_unit,info_.state.get_time_of_day(),info_.units,info_.teams);
+                               info_.disp.hide_unit(gamemap::location());
+                               info_.units.erase(u_it);
+                               u_it = info_.units.end();
                        }
                }
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]