hedgewars/uWorld.pas
changeset 5800 3a04c30e5ac7
parent 5684 bc3d2a58921c
child 5824 2e5835130d9a
child 5848 103e3a80daa6
--- a/hedgewars/uWorld.pas	Wed Sep 07 15:06:42 2011 -0400
+++ b/hedgewars/uWorld.pas	Wed Sep 07 20:12:20 2011 -0400
@@ -1314,9 +1314,12 @@
 
 procedure ShakeCamera(amount: LongWord);
 begin
+    if isCursorVisible then exit;
     amount:= Max(1, amount);
-    WorldDx:= WorldDx - amount + LongInt(getRandom(1 + amount * 2));
-    WorldDy:= WorldDy - amount + LongInt(getRandom(1 + amount * 2));
+    //WorldDx:= WorldDx - amount + LongInt(getRandom(1 + amount * 2));
+    //WorldDy:= WorldDy - amount + LongInt(getRandom(1 + amount * 2));
+    CursorPoint.X:= CursorPoint.X - amount + LongInt(getRandom(1 + amount * 2));
+    CursorPoint.Y:= CursorPoint.Y - amount + LongInt(getRandom(1 + amount * 2))
 end;