Fix changing tree transparency not updating vegatation map mode viewports

This commit is contained in:
Jonathan G Rennison
2020-11-05 21:41:06 +00:00
parent 386d34c0db
commit 81ec419046

View File

@@ -74,6 +74,9 @@ static inline void ToggleTransparency(TransparencyOption to)
extern void UpdateAllVehiclesIsDrawn();
if (to == TO_TUNNELS) UpdateAllVehiclesIsDrawn();
extern void MarkAllViewportMapLandscapesDirty();
if (to == TO_TREES) MarkAllViewportMapLandscapesDirty();
}
/**
@@ -84,6 +87,9 @@ static inline void ToggleTransparency(TransparencyOption to)
static inline void ToggleInvisibility(TransparencyOption to)
{
ToggleBit(_invisibility_opt, to);
extern void MarkAllViewportMapLandscapesDirty();
if (to == TO_TREES) MarkAllViewportMapLandscapesDirty();
}
/**
@@ -132,6 +138,10 @@ static inline void ResetRestoreAllTransparency()
extern void UpdateAllVehiclesIsDrawn();
UpdateAllVehiclesIsDrawn();
}
if (HasBit(old_transparency_opt ^ _transparency_opt, TO_TREES)) {
extern void MarkAllViewportMapLandscapesDirty();
MarkAllViewportMapLandscapesDirty();
}
MarkWholeScreenDirty();
}