Author: soliton
Date: Wed Oct 21 23:46:11 2009
New Revision: 39404
URL: http://svn.gna.org/viewcvs/wesnoth?rev=39404&view=rev
Log:
process advancement in [unstore_unit] only if it's our side's turn
this prevents all clients from doing the advancement simultaneously
and potentially causing OOS and thus allows the safe use of
[unstore_unit] in turn events
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=39404&r1=39403&r2=39404&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Wed Oct 21 23:46:11 2009
@@ -2558,7 +2558,8 @@
}
const int side = controller->current_side();
- if(utils::string_bool(cfg["advance"], true) &&
get_replay_source().at_end()) {
+ if (utils::string_bool(cfg["advance"], true) &&
get_replay_source().at_end()
+ && (*resources::teams)[side-1].is_local()) {
// Try to advance the unit
// Select advancement if it is on the
playing side and the player is a human
const bool sel = (side ==
static_cast<int>(u.side())
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits