mail[Wesnoth-commits] r27611 - in /trunk/src: multiplayer_connect.cpp multiplayer_wait.cpp play_controller.cpp playmp_controller.cpp


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

Header


Content

Posted by paniemin on June 30, 2008 - 14:02:
Author: suokko
Date: Mon Jun 30 14:02:09 2008
New Revision: 27611

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27611&view=rev
Log:
Moved MP era events registeration to play_controller

Modified:
    trunk/src/multiplayer_connect.cpp
    trunk/src/multiplayer_wait.cpp
    trunk/src/play_controller.cpp
    trunk/src/playmp_controller.cpp

Modified: trunk/src/multiplayer_connect.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/multiplayer_connect.cpp?rev=27611&r1=27610&r2=27611&view=diff
==============================================================================
--- trunk/src/multiplayer_connect.cpp (original)
+++ trunk/src/multiplayer_connect.cpp Mon Jun 30 14:02:09 2008
@@ -1116,12 +1116,6 @@
 
        level_to_gamestate(level_, state_, params_.saved_game);
 
-       // add era events only if not save
-       const config* const era_cfg = level_.child("era");
-       if (era_cfg != NULL && level_["savegame"] != "yes") {
-               
game_events::add_events(era_cfg->get_children("event"),"era_events");
-       }
-
        network::send_data(config("start_game"), 0, true);
 }
 

Modified: trunk/src/multiplayer_wait.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/multiplayer_wait.cpp?rev=27611&r1=27610&r2=27611&view=diff
==============================================================================
--- trunk/src/multiplayer_wait.cpp (original)
+++ trunk/src/multiplayer_wait.cpp Mon Jun 30 14:02:09 2008
@@ -349,11 +349,6 @@
                        DBG_NW << "Falling back to loading the old way.\n";
                        level_to_gamestate(level_, state_, level_["savegame"] 
== "yes");
                }
-       }
-       // add era events after loaded
-       const config* const era_cfg = level_.child("era");
-       if (era_cfg != NULL && level_["savegame"] != "yes") {
-               
game_events::add_events(era_cfg->get_children("event"),"era_events");
        }
 
        LOG_NW << "starting game\n";

Modified: trunk/src/play_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/play_controller.cpp?rev=27611&r1=27610&r2=27611&view=diff
==============================================================================
--- trunk/src/play_controller.cpp (original)
+++ trunk/src/play_controller.cpp Mon Jun 30 14:02:09 2008
@@ -139,6 +139,12 @@
 
        init_managers();
        
+
+       // add era events for MP game
+       const config* era_cfg = level_.child("era");
+       if (era_cfg != NULL) {
+               
game_events::add_events(era_cfg->get_children("event"),"era_events");
+       }
 
        LOG_NG << "initializing teams..." << unit_cfg.size() << "\n";;
        LOG_NG << (SDL_GetTicks() - ticks_) << "\n";

Modified: trunk/src/playmp_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playmp_controller.cpp?rev=27611&r1=27610&r2=27611&view=diff
==============================================================================
--- trunk/src/playmp_controller.cpp (original)
+++ trunk/src/playmp_controller.cpp Mon Jun 30 14:02:09 2008
@@ -44,6 +44,9 @@
        {
                skip_replay_ = false;
        }
+
+
+
 }
 
 playmp_controller::~playmp_controller() {




Related Messages


Powered by MHonArc, Updated Mon Jun 30 16:22:21 2008