Cache whether vehicle is currently drawn: Vehicle::IsDrawn()

This commit is contained in:
Jonathan G Rennison
2020-02-02 22:59:18 +00:00
parent 81a67b5b24
commit 76f68c48f5
13 changed files with 46 additions and 5 deletions

View File

@@ -70,6 +70,9 @@ static inline bool IsInvisibilitySet(TransparencyOption to)
static inline void ToggleTransparency(TransparencyOption to)
{
ToggleBit(_transparency_opt, to);
extern void UpdateAllVehiclesIsDrawn();
if (to == TO_TUNNELS) UpdateAllVehiclesIsDrawn();
}
/**