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: Sat, 29 Jan 2005 13:11:26 -0500

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

Modified files:
        src            : ai.cpp 

Log message:
        added comment explaining why a complex piece of code is the way it is

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

Patches:
Index: wesnoth/src/ai.cpp
diff -u wesnoth/src/ai.cpp:1.135 wesnoth/src/ai.cpp:1.136
--- wesnoth/src/ai.cpp:1.135    Sat Jan 29 18:08:51 2005
+++ wesnoth/src/ai.cpp  Sat Jan 29 18:11:26 2005
@@ -1,4 +1,4 @@
-/* $Id: ai.cpp,v 1.135 2005/01/29 18:08:51 Sirp Exp $ */
+/* $Id: ai.cpp,v 1.136 2005/01/29 18:11:26 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -258,7 +258,12 @@
        }
 
        const int num = std::distance(recruits.begin(),i);
-
+
+       //we have to add the recruit command now, because when the unit is 
created it has
+       //to have the recruit command in the recorder to be able to put random 
numbers into
+       //to generate unit traits. However we're not sure the transaction is 
going through yet,
+       //so use a replay_undo object to cancel it if we don't get to the point 
where the transaction
+       //is confirmed
        recorder.add_recruit(num,loc);
        replay_undo replay_guard(recorder);
 




reply via email to

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