diff options
Diffstat (limited to '')
-rw-r--r-- | src/CullZones.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/CullZones.cpp b/src/CullZones.cpp index f89d8256..9e020f73 100644 --- a/src/CullZones.cpp +++ b/src/CullZones.cpp @@ -2,6 +2,7 @@ #include "patcher.h" #include "Building.h" #include "Treadable.h" +#include "Train.h" #include "Pools.h" #include "Timer.h" #include "Camera.h" @@ -162,9 +163,33 @@ CCullZones::FindZoneWithStairsAttributeForPlayer(void) return nil; } -WRAPPER void +void CCullZones::MarkSubwayAsInvisible(bool visible) -{ EAXJMP(0x525AF0); +{ + int i, n; + CEntity *e; + CVehicle *v; + + n = CPools::GetBuildingPool()->GetSize(); + for(i = 0; i < n; i++){ + e = CPools::GetBuildingPool()->GetSlot(i); + if(e && e->bIsSubway) + e->bIsVisible = visible; + } + + n = CPools::GetTreadablePool()->GetSize(); + for(i = 0; i < n; i++){ + e = CPools::GetTreadablePool()->GetSlot(i); + if(e && e->bIsSubway) + e->bIsVisible = visible; + } + + n = CPools::GetVehiclePool()->GetSize(); + for(i = 0; i < n; i++){ + v = CPools::GetVehiclePool()->GetSlot(i); + if(v && v->IsTrain() && ((CTrain*)v)->m_trackId != 0) + v->bIsVisible = visible; + } } void |