Bring back smoothness for camera movement
authorunc0rr
Fri, 26 Jun 2009 19:52:42 +0000
changeset 2198 6a3d40acba8b
parent 2197 a02adcdaa939
child 2199 be265856322f
Bring back smoothness for camera movement
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Fri Jun 26 19:40:10 2009 +0000
+++ b/hedgewars/uWorld.pas	Fri Jun 26 19:52:42 2009 +0000
@@ -159,7 +159,7 @@
 		DrawTexture(cScreenWidth div 2 - 200 + AMxShift, cScreenHeight - 68, Ammoz[Ammo^[Slot, Pos].AmmoType].NameTex);
 		
 		if Ammo^[Slot, Pos].Count < AMMO_INFINITE then
-			DrawTexture(cScreenWidth + AMxShift - 35, cScreenHeight - 68, CountTexz[Ammo^[Slot, Pos].Count]);
+			DrawTexture(cScreenWidth div 2 + AMxShift - 35, cScreenHeight - 68, CountTexz[Ammo^[Slot, Pos].Count]);
 		
 		if bSelected and (Ammoz[Ammo^[Slot, Pos].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber < 0) then
 			begin
@@ -491,7 +491,7 @@
 		exit
 		end
 		else begin
-		CursorPoint.x:= (hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100 + WorldDx);
+		CursorPoint.x:= (prevPoint.x * 7 + hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100 + WorldDx) div 8;
 		//addcaption(inttostr(CursorPoint.X), $AFAFAF, capgrpGameState);
 		CursorPoint.y:= (prevPoint.y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + WorldDy)) div 8;
 		end;
@@ -530,7 +530,7 @@
       if CursorPoint.X > cScreenWidth div 2 - EdgesDist then
          begin
          WorldDx:= WorldDx - CursorPoint.X + cScreenWidth div 2 - EdgesDist;
-         CursorPoint.X:= cScreenWidth + cScreenWidth div 2 - EdgesDist
+         CursorPoint.X:= cScreenWidth div 2 - EdgesDist
          end;
       if CursorPoint.Y < EdgesDist then
          begin