project_files/HedgewarsMobile/Classes/OverlayViewController.m
changeset 3649 bc35f8fee587
parent 3648 2477029463ed
child 3650 ec90e573f47a
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m	Sat Jul 17 06:56:39 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m	Sat Jul 17 16:35:14 2010 +0200
@@ -183,6 +183,9 @@
         case 1:
         case 2:
         case 3:
+            [NSObject cancelPreviousPerformRequestsWithTarget:self
+                                                     selector:@selector(unsetPreciseStatus)
+                                                       object:nil];
             HW_walkingKeysUp();
             break;
         case 4:
@@ -218,9 +221,13 @@
             HW_walkRight();
             break;
         case 2:
+            [self performSelector:@selector(unsetPreciseStatus) withObject:nil afterDelay:0.8];
+            HW_preciseSet(YES);
             HW_aimUp();
             break;
         case 3:
+            [self performSelector:@selector(unsetPreciseStatus) withObject:nil afterDelay:0.8];
+            HW_preciseSet(YES);
             HW_aimDown();
             break;
         case 4:
@@ -249,6 +256,10 @@
     }
 }
 
+-(void) unsetPreciseStatus {
+    HW_preciseSet(NO);
+}
+
 // present a further check before closing game
 -(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
     if ([actionSheet cancelButtonIndex] != buttonIndex)