From 7b4e682668562f0a4c33068ac08261f3220dad2d Mon Sep 17 00:00:00 2001 From: Kp Date: Fri, 26 Sep 2014 02:42:12 +0000 Subject: [PATCH] Propagate for variables in similar/editor/medrobot.cpp --- similar/editor/medrobot.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/similar/editor/medrobot.cpp b/similar/editor/medrobot.cpp index 8adddebee..4a609f955 100644 --- a/similar/editor/medrobot.cpp +++ b/similar/editor/medrobot.cpp @@ -538,7 +538,6 @@ void robot_close_window() int robot_dialog_handler(UI_DIALOG *dlg, d_event *event, robot_dialog *r) { - int i; fix DeltaTime; fix64 Temp; int first_object_index; @@ -569,7 +568,7 @@ int robot_dialog_handler(UI_DIALOG *dlg, d_event *event, robot_dialog *r) // the current AI mode button be flagged as pressed down. //------------------------------------------------------------ if (r->old_object != Cur_object_index ) { - for ( i=0; i < NUM_BOXES; i++ ) + for ( int i=0; i < NUM_BOXES; i++ ) ui_radio_set_value(r->initialMode[i], 0); if ( Cur_object_index != object_none ) { int behavior = Objects[Cur_object_index].ctype.ai_info.behavior; @@ -585,7 +584,7 @@ int robot_dialog_handler(UI_DIALOG *dlg, d_event *event, robot_dialog *r) // If any of the radio buttons that control the mode are set, then // update the cooresponding AI state. //------------------------------------------------------------ - for ( i=0; i < NUM_BOXES; i++ ) { + for ( int i=0; i < NUM_BOXES; i++ ) { if ( GADGET_PRESSED(r->initialMode[i]) ) if (Objects[Cur_object_index].ctype.ai_info.behavior != MIN_BEHAVIOR+i) { Objects[Cur_object_index].ctype.ai_info.behavior = MIN_BEHAVIOR+i; // Set the ai_state to the cooresponding radio button