hedgewars/uWorld.pas
changeset 2970 011075f93746
parent 2959 258218a50df8
child 2971 c65929077646
equal deleted inserted replaced
2969:79024988792e 2970:011075f93746
   806 
   806 
   807 procedure MoveCamera;
   807 procedure MoveCamera;
   808 const PrevSentPointTime: LongWord = 0;
   808 const PrevSentPointTime: LongWord = 0;
   809 var EdgesDist,  wdy: LongInt;
   809 var EdgesDist,  wdy: LongInt;
   810 begin
   810 begin
   811 if (not (CurrentTeam^.ExtDriven and isCursorVisible)) and cHasFocus then
   811 if (not (CurrentTeam^.ExtDriven and isCursorVisible and not bShowAmmoMenu)) and cHasFocus then
   812     begin
   812     begin
   813     SDL_GetMouseState(@CursorPoint.X, @CursorPoint.Y);
   813     SDL_GetMouseState(@CursorPoint.X, @CursorPoint.Y);
   814     CursorPoint.X:= CursorPoint.X - (cScreenWidth shr 1);
   814     CursorPoint.X:= CursorPoint.X - (cScreenWidth shr 1);
   815     CursorPoint.Y:= cScreenHeight - CursorPoint.Y;
   815     CursorPoint.Y:= cScreenHeight - CursorPoint.Y;
   816     end;
   816     end;
   821         FollowGear:= nil;
   821         FollowGear:= nil;
   822         prevPoint:= CursorPoint;
   822         prevPoint:= CursorPoint;
   823         exit
   823         exit
   824         end
   824         end
   825         else begin
   825         else begin
   826         CursorPoint.x:= (prevPoint.x * 7 + hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100 + WorldDx) div 8;
   826         CursorPoint.X:= (prevPoint.X * 7 + hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100 + WorldDx) div 8;
   827         CursorPoint.y:= (prevPoint.y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + WorldDy)) div 8;
   827         CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + WorldDy)) div 8;
   828         end;
   828         end;
   829 
   829 
   830 wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - cVisibleWater;
   830 wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - cVisibleWater;
   831 if WorldDy < wdy then WorldDy:= wdy;
   831 if WorldDy < wdy then WorldDy:= wdy;
   832 
   832