From 45eafeb4d99dacb3bea9a12094554403f56fd545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Salamon?= Date: Thu, 5 May 2005 22:24:40 +0000 Subject: [PATCH] fix #12943, suggested by silene after we finally managed to isolate its cause --- changelog | 1 + src/ai.cpp | 3 --- src/playlevel.cpp | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/changelog b/changelog index 30ab9ca5cd1..3b833ab0dc5 100644 --- a/changelog +++ b/changelog @@ -50,6 +50,7 @@ CVS HEAD: * Turkish * slow now affects units with 2 or more attacks (not just 1 remaining) * slow now works with berserk and is cumulative across berserk rounds + * fix replays with idle_ai, as seen in user scenario Rebellion (#12943) * various bug fixes and code cleanups Version 0.9.1: diff --git a/src/ai.cpp b/src/ai.cpp index 3f795540298..7b576681207 100644 --- a/src/ai.cpp +++ b/src/ai.cpp @@ -877,9 +877,6 @@ void ai::do_move() move_leader_after_recruit(enemy_dstsrc); } } - - recorder.end_turn(); - sync_network(); } bool ai::do_combat(std::map& possible_moves, const move_map& srcdst, const move_map& dstsrc, const move_map& enemy_srcdst, const move_map& enemy_dstsrc) diff --git a/src/playlevel.cpp b/src/playlevel.cpp index fc7287bfe41..b9cd5cf2fc3 100644 --- a/src/playlevel.cpp +++ b/src/playlevel.cpp @@ -645,6 +645,8 @@ redo_turn: ai_interface::info ai_info(gui,map,gameinfo,units,teams,player_number,status,turn_data); util::scoped_ptr ai_obj(create_ai(team_it->ai_algorithm(),ai_info)); ai_obj->play_turn(); + recorder.end_turn(); + ai_obj->sync_network(); gui.recalculate_minimap(); clear_shroud(gui,status,map,gameinfo,units,teams,player_number-1);