Add several NewGRF variables to vehicle image callback whitelist
Add vehicle flags to control cached image invalidation Various refactorings
This commit is contained in:
@@ -204,7 +204,7 @@ void DisasterVehicle::UpdatePosition(int x, int y, int z)
|
||||
this->z_pos = z;
|
||||
this->tile = TileVirtXY(x, y);
|
||||
|
||||
this->cur_image_valid_dir = INVALID_DIR;
|
||||
this->InvalidateImageCache();
|
||||
this->UpdateImage();
|
||||
this->UpdatePositionAndViewport();
|
||||
|
||||
@@ -218,7 +218,7 @@ void DisasterVehicle::UpdatePosition(int x, int y, int z)
|
||||
safe_y = Clamp(u->y_pos, 0, MapMaxY() * TILE_SIZE);
|
||||
u->z_pos = GetSlopePixelZ(safe_x, safe_y);
|
||||
u->direction = this->direction;
|
||||
u->cur_image_valid_dir = INVALID_DIR;
|
||||
u->InvalidateImageCache();
|
||||
|
||||
u->UpdateImage();
|
||||
u->UpdatePositionAndViewport();
|
||||
|
||||
Reference in New Issue
Block a user