From 08e3dd168587e3c1f65cc9b2b93d917c7617c0ce Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sun, 9 Feb 2020 05:42:48 +0300 Subject: [PATCH] always calculate c and d in camera stuff --- src/game/g_game.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 87e4f90..854a15a 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -3702,11 +3702,11 @@ begin if (sY+sHeight > gMapInfo.Height) then sY := gMapInfo.Height-sHeight; if (sX < 0) then sX := 0; if (sY < 0) then sY := 0; - - if (gBackSize.X <= gPlayerScreenSize.X) or (gMapInfo.Width <= sWidth) then c := 0 else c := trunc((gBackSize.X-gPlayerScreenSize.X)*sX/(gMapInfo.Width-sWidth)); - if (gBackSize.Y <= gPlayerScreenSize.Y) or (gMapInfo.Height <= sHeight) then d := 0 else d := trunc((gBackSize.Y-gPlayerScreenSize.Y)*sY/(gMapInfo.Height-sHeight)); end; + if (gBackSize.X <= gPlayerScreenSize.X) or (gMapInfo.Width <= sWidth) then c := 0 else c := trunc((gBackSize.X-gPlayerScreenSize.X)*sX/(gMapInfo.Width-sWidth)); + if (gBackSize.Y <= gPlayerScreenSize.Y) or (gMapInfo.Height <= sHeight) then d := 0 else d := trunc((gBackSize.Y-gPlayerScreenSize.Y)*sY/(gMapInfo.Height-sHeight)); + //r_smallmap_h: 0: left; 1: center; 2: right //r_smallmap_v: 0: top; 1: center; 2: bottom // horiz small map? -- 2.29.2