[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src multiplayer_connect.cpp multiplayer...
From: |
Philippe Plantier |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src multiplayer_connect.cpp multiplayer... |
Date: |
Sat, 19 Mar 2005 10:44:39 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Philippe Plantier <address@hidden> 05/03/19 15:44:39
Modified files:
src : multiplayer_connect.cpp multiplayer_wait.cpp
Log message:
* Fixed bug #12347 : multiplayer replays don't work
* Fixed multiplayer saves made by the client not having the scenario
name by default.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_connect.cpp.diff?tr1=1.125&tr2=1.126&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/multiplayer_wait.cpp.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
Patches:
Index: wesnoth/src/multiplayer_connect.cpp
diff -u wesnoth/src/multiplayer_connect.cpp:1.125
wesnoth/src/multiplayer_connect.cpp:1.126
--- wesnoth/src/multiplayer_connect.cpp:1.125 Fri Mar 18 21:21:48 2005
+++ wesnoth/src/multiplayer_connect.cpp Sat Mar 19 15:44:39 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_connect.cpp,v 1.125 2005/03/18 21:21:48 ydirson Exp $ */
+/* $Id: multiplayer_connect.cpp,v 1.126 2005/03/19 15:44:39 gruikya Exp $ */
/*
Copyright (C)
Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -565,20 +565,23 @@
itor->resolve_random();
}
- // FIXME: This is to be reviewed!
- recorder.set_save_info(state_);
- recorder.set_skip(-1);
- level_.clear_children("replay");
- state_.snapshot = level_;
- state_.players.clear();
-
config lock;
lock.add_child("stop_updates");
network::send_data(lock);
+ // Replays the level
+ recorder.set_save_info(state_);
+ recorder.set_skip(-1);
+ level_.clear_children("replay");
+
// Re-sends the whole level
update_and_send_diff();
+ // This must be done after updating level_
+ state_.snapshot = level_;
+ state_.starting_pos = level_;
+ state_.players.clear();
+
config cfg;
cfg.add_child("start_game");
network::send_data(cfg);
@@ -937,7 +940,7 @@
state_.label = level_["name"];
state_.players.clear();
- state_.scenario = params_.name;
+ level_["scenario"] = state_.scenario = params_.name;
state_.campaign_type = "multiplayer";
if(!params_.saved_game)
Index: wesnoth/src/multiplayer_wait.cpp
diff -u wesnoth/src/multiplayer_wait.cpp:1.14
wesnoth/src/multiplayer_wait.cpp:1.15
--- wesnoth/src/multiplayer_wait.cpp:1.14 Fri Mar 18 21:21:48 2005
+++ wesnoth/src/multiplayer_wait.cpp Sat Mar 19 15:44:39 2005
@@ -1,4 +1,4 @@
-/* $Id: multiplayer_wait.cpp,v 1.14 2005/03/18 21:21:48 ydirson Exp $ */
+/* $Id: multiplayer_wait.cpp,v 1.15 2005/03/19 15:44:39 gruikya Exp $ */
/*
Copyright (C)
Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -287,7 +287,10 @@
}
LOG_NW << "starting game\n";
+
state_.campaign_type = "multiplayer";
+ state_.label = level_["name"];
+ state_.scenario = level_["scenario"];
state_.starting_pos = level_;
state_.snapshot = level_;
state_.players.clear();
- [Wesnoth-cvs-commits] wesnoth/src multiplayer_connect.cpp multiplayer...,
Philippe Plantier <=