Fix 1a38cbde7: Ship viewport hash not updated on rotation

This commit is contained in:
Jonathan G Rennison
2022-05-26 23:26:57 +01:00
parent f0a0b2e200
commit 72e2ee882e
2 changed files with 22 additions and 7 deletions

View File

@@ -1450,10 +1450,19 @@ public:
return;
}
bool always_update_viewport = false;
if (EXPECTED_TYPE == VEH_SHIP && update_delta) {
extern bool RecentreShipSpriteBounds(Vehicle *v);
always_update_viewport = RecentreShipSpriteBounds(this);
}
SetBit(this->vcache.cached_veh_flags, VCF_IMAGE_REFRESH);
if (force_update) {
this->Vehicle::UpdateViewport(IsPointInViewportVehicleRedrawArea(_viewport_vehicle_map_redraw_rects, pt));
} else if (always_update_viewport) {
this->Vehicle::UpdateViewport(false);
}
}