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
This commit is contained in:
parent
f5c405aa3e
commit
1554c2a2ec
1 changed files with 2 additions and 1 deletions
|
@ -2558,7 +2558,8 @@ WML_HANDLER_FUNCTION(unstore_unit, /*event_info*/, cfg)
|
|||
}
|
||||
|
||||
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())
|
||||
|
|
Loading…
Add table
Reference in a new issue