Fix ships leaving dots behind in viewport map mode

Fixes: 57db9a41
This commit is contained in:
Jonathan G Rennison
2024-04-16 17:51:51 +01:00
parent 1e38e513ae
commit 41543498f4
2 changed files with 5 additions and 6 deletions

View File

@@ -2064,7 +2064,7 @@ void ViewportMapDrawVehicles(DrawPixelInfo *dpi, Viewport *vp)
while (v != nullptr) {
if (!(v->vehstatus & (VS_HIDDEN | VS_UNCLICKABLE)) && (v->type != VEH_EFFECT)) {
Point pt = RemapCoords(v->x_pos + v->x_offs, v->y_pos + v->y_offs, v->z_pos);
Point pt = { v->coord.left, v->coord.top };
if (pt.x >= l && pt.x < r && pt.y >= t && pt.y < b) {
const int pixel_x = UnScaleByZoomLower(pt.x - l, dpi->zoom);
const int pixel_y = UnScaleByZoomLower(pt.y - t, dpi->zoom);