1
0
Fork 0

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

pull/12097/head
Peter Nelson 2025-05-26 21:45:46 +01:00 committed by GitHub
parent e23a591a1e
commit e2d066e5d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

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

View File

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