add a SDL_Delay into the ai code polling...

...for a new random seed received from the server
This commit is contained in:
Tomasz Śniatowski 2009-07-20 09:11:49 +01:00
parent 16a0d6af1f
commit 2d28bf00e5
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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);