summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/move.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/io/src/move.c')
-rw-r--r--digital/io/src/move.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/digital/io/src/move.c b/digital/io/src/move.c
index 27fc93fb..e4f59c39 100644
--- a/digital/io/src/move.c
+++ b/digital/io/src/move.c
@@ -47,6 +47,8 @@ move_start (position_t position, uint8_t backward)
move_data.backward_movement_allowed = backward;
move_data.final_move = 0;
move_data.shorten = 0;
+ /* Reset try counter. */
+ move_data.try_again_counter = 3;
/* Start the FSM. */
fsm_handle_event (&ai_fsm, AI_EVENT_move_start);
}
@@ -60,6 +62,8 @@ move_start_noangle (vect_t position, uint8_t backward, int16_t shorten)
move_data.backward_movement_allowed = backward;
move_data.final_move = 0;
move_data.shorten = shorten;
+ /* Reset try counter. */
+ move_data.try_again_counter = 3;
/* Start the FSM. */
fsm_handle_event (&ai_fsm, AI_EVENT_move_start);
}