mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 16:32:23 +00:00
add a SDL_Delay into the ai code polling...
...for a new random seed received from the server
This commit is contained in:
parent
16a0d6af1f
commit
2d28bf00e5
@ -261,6 +261,7 @@ void attack_result::do_execute()
|
||||
while (!rand_rng::has_valid_seed()){
|
||||
manager::raise_user_interact();
|
||||
manager::raise_sync_network();
|
||||
SDL_Delay(10);
|
||||
}
|
||||
recorder.add_seed("attack", rand_rng::get_last_seed());
|
||||
attack(attacker_loc_, defender_loc_, attacker_weapon, defender_weapon, get_info().units);
|
||||
|
@ -550,6 +550,7 @@ void readwrite_context_impl::attack_enemy(const map_location u,
|
||||
while (!rand_rng::has_valid_seed()){
|
||||
manager::raise_user_interact();
|
||||
manager::raise_sync_network();
|
||||
SDL_Delay(10);
|
||||
}
|
||||
recorder.add_seed("attack", rand_rng::get_last_seed());
|
||||
attack(u, target, weapon, def_weapon, get_info().units);
|
||||
|
Loading…
x
Reference in New Issue
Block a user