hedgewars/uWorld.pas
branchhedgeroid
changeset 5824 2e5835130d9a
parent 5725 e27100a0e2d0
parent 5800 3a04c30e5ac7
child 5828 667fb58d7f18
equal deleted inserted replaced
5733:5ab22736bdb6 5824:2e5835130d9a
  1317     if missionTex <> nil then FreeTexture(missionTex);
  1317     if missionTex <> nil then FreeTexture(missionTex);
  1318 end;
  1318 end;
  1319 
  1319 
  1320 procedure ShakeCamera(amount: LongWord);
  1320 procedure ShakeCamera(amount: LongWord);
  1321 begin
  1321 begin
       
  1322     if isCursorVisible then exit;
  1322     amount:= Max(1, amount);
  1323     amount:= Max(1, amount);
  1323     WorldDx:= WorldDx - amount + LongInt(getRandom(1 + amount * 2));
  1324     //WorldDx:= WorldDx - amount + LongInt(getRandom(1 + amount * 2));
  1324     WorldDy:= WorldDy - amount + LongInt(getRandom(1 + amount * 2));
  1325     //WorldDy:= WorldDy - amount + LongInt(getRandom(1 + amount * 2));
       
  1326     CursorPoint.X:= CursorPoint.X - amount + LongInt(getRandom(1 + amount * 2));
       
  1327     CursorPoint.Y:= CursorPoint.Y - amount + LongInt(getRandom(1 + amount * 2))
  1325 end;
  1328 end;
  1326 
  1329 
  1327 
  1330 
  1328 procedure onFocusStateChanged;
  1331 procedure onFocusStateChanged;
  1329 begin
  1332 begin