[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src playturn.cpp
From: |
David White |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src playturn.cpp |
Date: |
Sat, 23 Jul 2005 11:32:36 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 05/07/23 15:32:36
Modified files:
src : playturn.cpp
Log message:
Fixed bug where recalling a unit wouldn't clear shroud immediately
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playturn.cpp.diff?tr1=1.385&tr2=1.386&r1=text&r2=text
Patches:
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.385 wesnoth/src/playturn.cpp:1.386
--- wesnoth/src/playturn.cpp:1.385 Sat Jul 23 15:29:40 2005
+++ wesnoth/src/playturn.cpp Sat Jul 23 15:32:36 2005
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.385 2005/07/23 15:29:40 Sirp Exp $ */
+/* $Id: playturn.cpp,v 1.386 2005/07/23 15:32:36 Sirp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -1939,20 +1939,19 @@
if(msg.empty()) {
current_team.spend_gold(u_type->second.cost());
statistics::recruit_unit(new_unit);
+
+ clear_undo_stack();
+ redo_stack_.clear();
+
+ clear_shroud();
+
+ gui_.recalculate_minimap();
+ gui_.invalidate_game_status();
+ gui_.invalidate_all();
} else {
recorder.undo();
- gui::show_dialog(gui_,NULL,"",msg,gui::OK_ONLY);
- return;
+ gui::show_dialog(gui_,NULL,"",msg,gui::OK_ONLY);
}
-
- clear_undo_stack();
- redo_stack_.clear();
-
- clear_shroud();
-
- gui_.recalculate_minimap();
- gui_.invalidate_game_status();
- gui_.invalidate_all();
}
}
@@ -2109,7 +2108,9 @@
current_team.spend_gold(game_config::recall_cost);
undo_stack_.push_back(undo_action(un,loc,res));
- redo_stack_.clear();
+ redo_stack_.clear();
+
+ clear_shroud();
recall_list.erase(recall_list.begin()+res);
gui_.invalidate_game_status();