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

[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: Mon, 28 Feb 2005 20:26:39 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    05/03/01 01:26:38

Modified files:
        src            : playturn.cpp 

Log message:
        added new debug mode command: create <unit name> to create a unit

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

Patches:
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.334 wesnoth/src/playturn.cpp:1.335
--- wesnoth/src/playturn.cpp:1.334      Sun Feb 27 18:10:48 2005
+++ wesnoth/src/playturn.cpp    Tue Mar  1 01:26:38 2005
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.334 2005/02/27 18:10:48 ydirson Exp $ */
+/* $Id: playturn.cpp,v 1.335 2005/03/01 01:26:38 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -2433,6 +2433,14 @@
                                gui_.invalidate_unit();
                        }
                }
+       } else if(game_config::debug && cmd == "create" && 
map_.on_board(last_hex_)) {
+               const game_data::unit_type_map::const_iterator i = 
gameinfo_.unit_types.find(data);
+               if(i == gameinfo_.unit_types.end()) {
+                       return;
+               }
+
+               units_.erase(last_hex_);
+               
units_.insert(std::pair<gamemap::location,unit>(last_hex_,unit(&i->second,1,false)));
        }
 }
 




reply via email to

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