--- a/hedgewars/uWorld.pas Sun Mar 21 13:53:47 2010 +0000
+++ b/hedgewars/uWorld.pas Sun Mar 21 15:50:38 2010 +0000
@@ -44,6 +44,7 @@
procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup);
procedure ShowMission(caption, subcaption, text: ansistring; icon, time : LongInt);
procedure HideMission;
+procedure ShakeCamera(amount: LongWord);
implementation
uses uStore, uMisc, uTeams, uIO, uConsole, uKeys, uLocale, uSound, uAmmos, uVisualGears, uChat, uLandTexture, uLand,
@@ -925,6 +926,13 @@
missionTimer:= 0
end;
+procedure ShakeCamera(amount: LongWord);
+begin
+ amount:= max(1, amount);
+ WorldDx:= WorldDx - amount + LongInt(getRandom(1 + amount * 2));
+ WorldDy:= WorldDy - amount + LongInt(getRandom(1 + amount * 2));
+end;
+
procedure init_uWorld;
begin
fpsTexture:= nil;