Exclude effect and disaster vehicles from vehicle tile hash

This commit is contained in:
Jonathan G Rennison
2020-02-28 18:52:02 +00:00
parent 1d79a7610d
commit 4020719227
2 changed files with 12 additions and 13 deletions

View File

@@ -864,7 +864,16 @@ public:
void UpdateVisualEffect(bool allow_power_change = true);
void ShowVisualEffect() const;
void UpdatePosition();
/**
* Update the position of the vehicle. This will update the hash that tells
* which vehicles are on a tile.
*/
void UpdatePosition()
{
extern void UpdateVehicleTileHash(Vehicle *v, bool remove);
if (this->type < VEH_COMPANY_END) UpdateVehicleTileHash(this, false);
}
void UpdateViewport(bool dirty);
void UpdatePositionAndViewport();
void MarkAllViewportsDirty() const;