mail[Wesnoth-commits] r48197 - in /trunk/src: gamestatus.cpp play_controller.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by terraninfo on January 03, 2011 - 23:49:
Author: crab
Date: Mon Jan  3 23:49:32 2011
New Revision: 48197

URL: http://svn.gna.org/viewcvs/wesnoth?rev=48197&view=rev
Log:
fix issue with broken scenario carrover caused by my yesterday's commit 
(usage of refs that went out of scope)

Modified:
    trunk/src/gamestatus.cpp
    trunk/src/play_controller.cpp

Modified: trunk/src/gamestatus.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gamestatus.cpp?rev=48197&r1=48196&r2=48197&view=diff
==============================================================================
--- trunk/src/gamestatus.cpp (original)
+++ trunk/src/gamestatus.cpp Mon Jan  3 23:49:32 2011
@@ -733,6 +733,7 @@
                        }
                }
 
+               DBG_NG_TC << "save id: "<< save_id_ <<std::endl;
                DBG_NG_TC << "snapshot: "<< (player_exists_ ? "true" : 
"false") <<std::endl;
                DBG_NG_TC << "player_cfg: "<< (player_cfg_==NULL ? "is null" 
: "is not null") <<std::endl;
                DBG_NG_TC << "player_exists: "<< (player_exists_ ? "true" : 
"false") <<std::endl;

Modified: trunk/src/play_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/play_controller.cpp?rev=48197&r1=48196&r2=48197&view=diff
==============================================================================
--- trunk/src/play_controller.cpp (original)
+++ trunk/src/play_controller.cpp Mon Jan  3 23:49:32 2011
@@ -201,14 +201,11 @@
                                first_human_team_ = team_num;
                        }
                }
-               team_builders.push_back(gamestate_.create_team_builder(side,
-                       save_id, teams_, level_, map_, units_, snapshot));
+               team_builder_ptr tb_ptr = gamestate_.create_team_builder(side,
+                       save_id, teams_, level_, map_, units_, snapshot);
                ++team_num;
-       }
-
-       foreach (team_builder_ptr tb_ptr, team_builders)
-       {
                gamestate_.build_team_stage_one(tb_ptr);
+               team_builders.push_back(tb_ptr);
        }
 
        foreach (team_builder_ptr tb_ptr, team_builders)




Related Messages


Powered by MHonArc, Updated Tue Jan 04 00:20:05 2011