hedgewars/uWorld.pas
branchcursor_issues
changeset 5149 9aa840fdf922
parent 5022 d2a2f6c9b236
child 5191 c7000a6b397b
equal deleted inserted replaced
5148:73b3b4b8359c 5149:9aa840fdf922
  1154    end;
  1154    end;
  1155 isFirstFrame:= false
  1155 isFirstFrame:= false
  1156 end;
  1156 end;
  1157 
  1157 
  1158 procedure MoveCamera;
  1158 procedure MoveCamera;
  1159 var EdgesDist,  wdy: LongInt;
  1159 var EdgesDist, wdy, shs: LongInt;
  1160     PrevSentPointTime: LongWord = 0;
  1160     PrevSentPointTime: LongWord = 0;
  1161 begin
  1161 begin
  1162 {$IFNDEF IPHONEOS}
  1162 {$IFNDEF IPHONEOS}
  1163 if (not (CurrentTeam^.ExtDriven and isCursorVisible and not bShowAmmoMenu)) and cHasFocus then
  1163 if (not (CurrentTeam^.ExtDriven and isCursorVisible and not bShowAmmoMenu)) and cHasFocus then
  1164 begin
  1164 begin
  1228         if CursorPoint.X > cScreenWidth div 2 - EdgesDist then
  1228         if CursorPoint.X > cScreenWidth div 2 - EdgesDist then
  1229         begin
  1229         begin
  1230             WorldDx:= WorldDx - CursorPoint.X + cScreenWidth div 2 - EdgesDist;
  1230             WorldDx:= WorldDx - CursorPoint.X + cScreenWidth div 2 - EdgesDist;
  1231             CursorPoint.X:= cScreenWidth div 2 - EdgesDist
  1231             CursorPoint.X:= cScreenWidth div 2 - EdgesDist
  1232         end;
  1232         end;
  1233     if CursorPoint.Y < EdgesDist then
  1233 
  1234     begin
  1234     shs:= cScreenHeight div 2 - trunc(cScreenHeight / cScaleFactor) + EdgesDist;
  1235         WorldDy:= WorldDy + CursorPoint.Y - EdgesDist;
  1235     if CursorPoint.Y < shs then
  1236         CursorPoint.Y:= EdgesDist
  1236     begin
       
  1237         WorldDy:= WorldDy + CursorPoint.Y - shs;
       
  1238         CursorPoint.Y:= shs;
  1237     end
  1239     end
  1238     else
  1240     else
  1239         if CursorPoint.Y > cScreenHeight - EdgesDist then
  1241         if CursorPoint.Y > cScreenHeight - EdgesDist then
  1240         begin
  1242         begin
  1241            WorldDy:= WorldDy + CursorPoint.Y - cScreenHeight + EdgesDist;
  1243            WorldDy:= WorldDy + CursorPoint.Y - cScreenHeight + EdgesDist;