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

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

[Wesnoth-cvs-commits] wesnoth/src actions.cpp playturn.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src actions.cpp playturn.cpp
Date: Sun, 29 Aug 2004 21:41:18 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    04/08/30 01:36:32

Modified files:
        src            : actions.cpp playturn.cpp 

Log message:
        made vision range based on potential movement

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.151&tr2=1.152&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playturn.cpp.diff?tr1=1.261&tr2=1.262&r1=text&r2=text

Patches:
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.151 wesnoth/src/actions.cpp:1.152
--- wesnoth/src/actions.cpp:1.151       Fri Aug 27 01:38:11 2004
+++ wesnoth/src/actions.cpp     Mon Aug 30 01:36:32 2004
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.151 2004/08/27 01:38:11 Sirp Exp $ */
+/* $Id: actions.cpp,v 1.152 2004/08/30 01:36:32 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1455,7 +1455,15 @@
 {
        std::vector<gamemap::location> cleared_locations;
 
-       paths p(map,status,gamedata,units,loc,teams,true,false);
+       const unit_map::const_iterator u = units.find(loc);
+       if(u == units.end()) {
+               return false;
+       }
+
+       unit_map temp_units;
+       temp_units.insert(*u);
+
+       paths p(map,status,gamedata,temp_units,loc,teams,true,false);
        for(paths::routes_map::const_iterator i = p.routes.begin();
            i != p.routes.end(); ++i) {
                clear_shroud_loc(map,teams[team],i->first,&cleared_locations);
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.261 wesnoth/src/playturn.cpp:1.262
--- wesnoth/src/playturn.cpp:1.261      Mon Aug 30 01:23:16 2004
+++ wesnoth/src/playturn.cpp    Mon Aug 30 01:36:32 2004
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.261 2004/08/30 01:23:16 Sirp Exp $ */
+/* $Id: playturn.cpp,v 1.262 2004/08/30 01:36:32 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1423,7 +1423,7 @@
                                gui::show_dialog(gui_,NULL,_("Saved"),_("The 
game has been saved"), gui::OK_ONLY);
                        }
                } catch(gamestatus::save_game_failed& e) {
-                       gui::show_dialog(gui_,NULL,"",_("The game could not be 
saved"),gui::MESSAGE);
+                       gui::show_dialog(gui_,NULL,_("Error"),_("The game could 
not be saved"),gui::MESSAGE);
                        //do not bother retrying, since the user can just try 
to save the game again
                };
        }




reply via email to

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