fix moves sometimes not undone when control is changed.
with the 'fix chat not working during delay/animation' it could happen that play_slice_catch would process a incoming controller change in which case that while loop would end without the code inside that 'if (player_type_changed_)' being executed, which woudl lead to oos errors since that client woudl have made moves that other players don't have.
This commit is contained in:
parent
219f977b27
commit
1e1a6fbe48
1 changed files with 2 additions and 2 deletions
|
@ -139,6 +139,8 @@ void playmp_controller::play_human_turn()
|
|||
while(!should_return_to_play_side()) {
|
||||
try {
|
||||
process_network_data();
|
||||
check_objectives();
|
||||
play_slice_catch();
|
||||
if (player_type_changed_)
|
||||
{
|
||||
// Clean undo stack if turn has to be restarted (losing control)
|
||||
|
@ -160,8 +162,6 @@ void playmp_controller::play_human_turn()
|
|||
undo_stack().undo();
|
||||
|
||||
}
|
||||
check_objectives();
|
||||
play_slice_catch();
|
||||
if(timer)
|
||||
{
|
||||
bool time_left = timer->update();
|
||||
|
|
Loading…
Add table
Reference in a new issue