- fixed the movement factor for automap panning.

Fixes #363
This commit is contained in:
Christoph Oelckers 2020-09-07 20:39:07 +02:00
parent de7da0d4d7
commit e4fa695b57

View file

@ -212,7 +212,7 @@ void AutomapControl()
} }
am_zoomdir = 0; am_zoomdir = 0;
double j = interval * (120. / 1000); double j = interval * 35. / gZoom;
if (buttonMap.ButtonDown(gamefunc_Enlarge_Screen)) if (buttonMap.ButtonDown(gamefunc_Enlarge_Screen))
gZoom += (int)fmulscale6(j, max(gZoom, 256)); gZoom += (int)fmulscale6(j, max(gZoom, 256));
@ -241,8 +241,8 @@ void AutomapControl()
momx += mulscale9(panhorz, sintable[(follow_a) & 2047]); momx += mulscale9(panhorz, sintable[(follow_a) & 2047]);
momy += mulscale9(panhorz, sintable[(follow_a + 1536) & 2047]); momy += mulscale9(panhorz, sintable[(follow_a + 1536) & 2047]);
follow_x += int((momx * j) / (gZoom * 4000.)); follow_x += int(momx * j);
follow_y += int((momy * j) / (gZoom * 4000.)); follow_y += int(momy * j);
if (x_min_bound == INT_MAX) CalcMapBounds(); if (x_min_bound == INT_MAX) CalcMapBounds();
follow_x = clamp(follow_x, x_min_bound, x_max_bound); follow_x = clamp(follow_x, x_min_bound, x_max_bound);