summaryrefslogtreecommitdiffstats
path: root/src/CullZones.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-28 19:23:28 +0200
committeraap <aap@papnet.eu>2019-06-28 19:23:28 +0200
commit48cf8b6629da53443be6b1580ee15ad768c53370 (patch)
treed6bdeb18130b49096a995789840faf382f68f7ee /src/CullZones.cpp
parentMerge pull request #67 from gennariarmando/master (diff)
downloadre3-48cf8b6629da53443be6b1580ee15ad768c53370.tar
re3-48cf8b6629da53443be6b1580ee15ad768c53370.tar.gz
re3-48cf8b6629da53443be6b1580ee15ad768c53370.tar.bz2
re3-48cf8b6629da53443be6b1580ee15ad768c53370.tar.lz
re3-48cf8b6629da53443be6b1580ee15ad768c53370.tar.xz
re3-48cf8b6629da53443be6b1580ee15ad768c53370.tar.zst
re3-48cf8b6629da53443be6b1580ee15ad768c53370.zip
Diffstat (limited to '')
-rw-r--r--src/CullZones.cpp29
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