hedgewars/uWorld.pas
branchhedgeroid
changeset 5824 2e5835130d9a
parent 5725 e27100a0e2d0
parent 5800 3a04c30e5ac7
child 5828 667fb58d7f18
--- a/hedgewars/uWorld.pas	Fri Sep 09 04:39:17 2011 +0200
+++ b/hedgewars/uWorld.pas	Fri Sep 09 05:15:45 2011 +0200
@@ -1319,9 +1319,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;