1
0
Fork 0

Codefix: Effect vehicles don't use v->tile, so shouldn't be in the vehicle tile hash.

pull/14302/head
Peter Nelson 2025-05-25 20:57:30 +01:00
parent b042e7a439
commit 4ca2d8af1e
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
2 changed files with 2 additions and 2 deletions

View File

@ -541,7 +541,7 @@ void AfterLoadVehiclesPhase2(bool part_of_load)
v->UpdateDeltaXY(); v->UpdateDeltaXY();
v->coord.left = INVALID_COORD; v->coord.left = INVALID_COORD;
v->sprite_cache.old_coord.left = INVALID_COORD; v->sprite_cache.old_coord.left = INVALID_COORD;
v->UpdatePosition(); if (v->type != VEH_EFFECT) v->UpdatePosition();
v->UpdateViewport(false); v->UpdateViewport(false);
} }
} }

View File

@ -1733,7 +1733,7 @@ void Vehicle::UpdateViewport(bool dirty)
*/ */
void Vehicle::UpdatePositionAndViewport() void Vehicle::UpdatePositionAndViewport()
{ {
this->UpdatePosition(); if (this->type != VEH_EFFECT) this->UpdatePosition();
this->UpdateViewport(true); this->UpdateViewport(true);
} }