mail[Wesnoth-commits] r37275 - /trunk/src/playcampaign.cpp


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

Header


Content

Posted by e0204097 on July 27, 2009 - 17:35:
Author: euschn
Date: Mon Jul 27 17:35:29 2009
New Revision: 37275

URL: http://svn.gna.org/viewcvs/wesnoth?rev=37275&view=rev
Log:
fixed carryover information for randomly generated scenarios, addresses bug 
#14016

Modified:
    trunk/src/playcampaign.cpp

Modified: trunk/src/playcampaign.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playcampaign.cpp?rev=37275&r1=37274&r2=37275&view=diff
==============================================================================
--- trunk/src/playcampaign.cpp (original)
+++ trunk/src/playcampaign.cpp Mon Jul 27 17:35:29 2009
@@ -317,7 +317,10 @@
                                scenario2 = 
random_generate_scenario((*scenario)["scenario_generation"], 
scenario->child("generator"));
                                //level_ = scenario;
                                preload_lua_tags(game_config, scenario2);
-                               gamestate.starting_pos = scenario2;
+                               //merge carryover information into the newly 
generated scenario
+                               config temp(scenario2);
+                               write_players(gamestate, temp, false, true);
+                               gamestate.starting_pos = temp;
                                scenario = &scenario2;
                        }
                        std::string map_data = (*scenario)["map_data"];
@@ -338,7 +341,10 @@
                                new_level["map_data"] = map_data;
                                scenario = &new_level;
 
-                               gamestate.starting_pos = new_level;
+                               //merge carryover information into the 
scenario
+                               config temp(new_level);
+                               write_players(gamestate, temp, false, true);
+                               gamestate.starting_pos = temp;
                                LOG_G << "generated map\n";
                        }
 




Related Messages


Powered by MHonArc, Updated Mon Jul 27 23:21:18 2009