Author: mordante
Date: Sun Mar 27 13:15:02 2011
New Revision: 49014
URL: http://svn.gna.org/viewcvs/wesnoth?rev=49014&view=rev
Log:
When no side in shroud select side 1.
This restores backwardscompatibility.
Modified:
trunk/src/game_events.cpp
Modified: trunk/src/game_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=49014&r1=49013&r2=49014&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Sun Mar 27 13:15:02 2011
@@ -546,15 +546,12 @@
{
std::string side_for_raw = cfg["side"];
- //If they didn't define any sides then we are making a comma separated
list for them
- //It contains all the sides from 1 to the max number of sides in play
+ // If they didn't define any sides fall back to the old behaviour of
+ // selecting side 1.
if (side_for_raw.empty()) {
- side_for_raw = "1";
- for (size_t side_index = 1; side_index <
resources::teams->size(); side_index++) {
- std::string side_fake = lexical_cast<std::string>(
side_index + 1 );
- side_for_raw = side_for_raw + "," + side_fake;
- }
- }
+ side_for_raw = "1";
+ }
+
//iterate through the list
std::vector<std::string> side_for =
utils::split(side_for_raw, ',', utils::STRIP_SPACES |
utils::REMOVE_EMPTY);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits