hedgewars/uCommandHandlers.pas
changeset 14700 4eaeba349179
parent 14699 c96889bf5796
child 14701 d74517fdb34f
--- a/hedgewars/uCommandHandlers.pas	Tue Feb 05 02:18:13 2019 +0100
+++ b/hedgewars/uCommandHandlers.pas	Tue Feb 05 02:46:41 2019 +0100
@@ -285,6 +285,10 @@
 with CurrentHedgehog^.Gear^ do
     Message:= Message or (gmPrecise and InputMask);
     ScriptCall('onPrecise');
+if cVolumeDelta > 0 then
+    cVolumeDelta:= 1;
+if cVolumeDelta < 0 then
+    cVolumeDelta:= -1;
 end;
 
 procedure chPrecise_m(var s: shortstring);
@@ -297,6 +301,10 @@
 with CurrentHedgehog^.Gear^ do
     Message:= Message and (not (gmPrecise and InputMask));
     ScriptCall('onPreciseUp');
+if cVolumeDelta > 0 then
+    cVolumeDelta:= 3;
+if cVolumeDelta < 0 then
+    cVolumeDelta:= -3;
 end;
 
 procedure chLJump(var s: shortstring);
@@ -595,13 +603,19 @@
 procedure chVol_p(var s: shortstring);
 begin
 s:= s; // avoid compiler hint
-inc(cVolumeDelta, 3)
+if (LocalMessage and gmPrecise) <> 0 then
+    inc(cVolumeDelta, 1)
+else
+    inc(cVolumeDelta, 3);
 end;
 
 procedure chVol_m(var s: shortstring);
 begin
 s:= s; // avoid compiler hint
-dec(cVolumeDelta, 3)
+if (LocalMessage and gmPrecise) <> 0 then
+    dec(cVolumeDelta, 1)
+else
+    dec(cVolumeDelta, 3);
 end;
 
 procedure chMute(var s: shortstring);
@@ -719,14 +733,20 @@
 begin
     s:= s; // avoid compiler hint
     if ZoomValue < cMinZoomLevel then
-        ZoomValue:= ZoomValue + cZoomDelta;
+        if (LocalMessage and gmPrecise <> 0) then
+            ZoomValue:= ZoomValue + cZoomDeltaSmall
+        else
+            ZoomValue:= ZoomValue + cZoomDelta;
 end;
 
 procedure chZoomOut(var s: shortstring);
 begin
     s:= s; // avoid compiler hint
     if ZoomValue > cMaxZoomLevel then
-        ZoomValue:= ZoomValue - cZoomDelta;
+        if (LocalMessage and gmPrecise <> 0) then
+            ZoomValue:= ZoomValue - cZoomDeltaSmall
+        else
+            ZoomValue:= ZoomValue - cZoomDelta;
 end;
 
 procedure chZoomReset(var s: shortstring);