hedgewars/uWorld.pas
changeset 2407 9f413bd5150e
parent 2397 2ca4ca6b4bab
child 2409 dbf195c3e09c
equal deleted inserted replaced
2406:2e757b32991e 2407:9f413bd5150e
   564 		prevPoint:= CursorPoint;
   564 		prevPoint:= CursorPoint;
   565 		exit
   565 		exit
   566 		end
   566 		end
   567 		else begin
   567 		else begin
   568 		CursorPoint.x:= (prevPoint.x * 7 + hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100 + WorldDx) div 8;
   568 		CursorPoint.x:= (prevPoint.x * 7 + hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100 + WorldDx) div 8;
   569 		//addcaption(inttostr(CursorPoint.X), $AFAFAF, capgrpGameState);
       
   570 		CursorPoint.y:= (prevPoint.y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + WorldDy)) div 8;
   569 		CursorPoint.y:= (prevPoint.y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + WorldDy)) div 8;
   571 		end;
   570 		end;
   572 
   571 
   573 wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - cVisibleWater;
   572 wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - cVisibleWater;
   574 if WorldDy < wdy then WorldDy:= wdy;
   573 if WorldDy < wdy then WorldDy:= wdy;
   588 
   587 
   589 if isCursorVisible then
   588 if isCursorVisible then
   590 	begin
   589 	begin
   591 	if (not CurrentTeam^.ExtDriven) and (GameTicks >= PrevSentPointTime + cSendCursorPosTime) then
   590 	if (not CurrentTeam^.ExtDriven) and (GameTicks >= PrevSentPointTime + cSendCursorPosTime) then
   592 		begin
   591 		begin
   593 		SendIPCXY('P', CursorPoint.X - WorldDx, CursorPoint.Y - WorldDy);
   592 		SendIPCXY('P', CursorPoint.X - WorldDx, cScreenHeight - CursorPoint.Y - WorldDy);
   594 		PrevSentPointTime:= GameTicks
   593 		PrevSentPointTime:= GameTicks
   595 		end;
   594 		end;
   596 	end;
   595 	end;
   597 
   596 
   598 if isCursorVisible or (FollowGear <> nil) then
   597 if isCursorVisible or (FollowGear <> nil) then