Author: alarantalara
Date: Tue Oct 25 02:00:53 2011
New Revision: 51621
URL: http://svn.gna.org/viewcvs/wesnoth?rev=51621&view=rev
Log:
Apply patch #2961 by SigurdTheDragon
Fixes bug #18599
Fixes bug #18600
Modified:
trunk/src/multiplayer_connect.cpp
Modified: trunk/src/multiplayer_connect.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/multiplayer_connect.cpp?rev=51621&r1=51620&r2=51621&view=diff
==============================================================================
--- trunk/src/multiplayer_connect.cpp (original)
+++ trunk/src/multiplayer_connect.cpp Tue Oct 25 02:00:53 2011
@@ -1169,7 +1169,16 @@
{
DBG_MP << "starting a new game" << std::endl;
- // Shuffle sides (check preferences and if it is a re-loaded
game)
+ // Resolves the "random faction", "random gender" and "random message"
+ // Must be done before shuffle sides, or some cases will cause errors
+ for (side_list::iterator itor = sides_.begin(); itor != sides_.end();
+ ++itor) {
+
+ itor->resolve_random();
+ }
+
+ // Shuffle sides (check preferences and if it is a re-loaded game)
+ // Must be done after resolve_random() or shuffle sides, or they won't
work.
if (preferences::shuffle_sides() && !(level_.child("snapshot") &&
level_.child("snapshot").child("side")))
{
// Only playable sides should be shuffled
@@ -1204,12 +1213,6 @@
}
}
- // Resolves the "random faction", "random gender" and "random message"
- for (side_list::iterator itor = sides_.begin(); itor != sides_.end();
- ++itor) {
-
- itor->resolve_random();
- }
// Make other clients not show the results of resolve_random().
config lock;
lock.add_child("stop_updates");
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits