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

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

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


From: Jon Daniel
Subject: [Wesnoth-cvs-commits] wesnoth/src playlevel.cpp
Date: Fri, 21 Jan 2005 02:03:02 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Jon Daniel <address@hidden>     05/01/21 07:03:02

Modified files:
        src            : playlevel.cpp 

Log message:
        Changed the side turn event to be fired only if there is a real side 
change

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

Patches:
Index: wesnoth/src/playlevel.cpp
diff -u wesnoth/src/playlevel.cpp:1.167 wesnoth/src/playlevel.cpp:1.168
--- wesnoth/src/playlevel.cpp:1.167     Fri Jan 21 02:14:55 2005
+++ wesnoth/src/playlevel.cpp   Fri Jan 21 07:03:01 2005
@@ -1,4 +1,4 @@
-/* $Id: playlevel.cpp,v 1.167 2005/01/21 02:14:55 j_daniel Exp $ */
+/* $Id: playlevel.cpp,v 1.168 2005/01/21 07:03:01 j_daniel Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -509,6 +509,11 @@
                                player_number_str << player_number;
                                
game_events::set_variable("side_number",player_number_str.str());
 
+                               //fire side turn event only if real side change 
occurs not counting changes from void to a side
+                               if (team_it != teams.begin()+first_player || 
!first_time) {
+                                       game_events::fire("side turn");
+                               }
+
                                //we want to work out if units for this player 
should get healed, and the
                                //player should get income now. healing/income 
happen if it's not the first
                                //turn of processing, or if we are loading a 
game, and this is not the
@@ -516,7 +521,6 @@
                                const bool turn_refresh = !first_time || 
loading_game && team_it != teams.begin()+first_player;
 
                                if(turn_refresh) {
-                                       game_events::fire("side turn");
                                        for(unit_map::iterator i = 
units.begin(); i != units.end(); ++i) {
                                                if(i->second.side() == 
player_number) {
                                                        i->second.new_turn();




reply via email to

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