summaryrefslogtreecommitdiffstats
path: root/src/CullZones.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-06-29 15:55:19 +0200
committereray orçunus <erayorcunus@gmail.com>2019-06-29 15:55:19 +0200
commit0974447f585a457ea7d68187db28bcec5aa269e2 (patch)
tree6f7cf38dc4ea9a17b1bc6125fcc69758cf535e34 /src/CullZones.cpp
parentMerge branch 'master' of git://github.com/GTAmodding/re3 into erorcun (diff)
parentfix (diff)
downloadre3-0974447f585a457ea7d68187db28bcec5aa269e2.tar
re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.gz
re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.bz2
re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.lz
re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.xz
re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.zst
re3-0974447f585a457ea7d68187db28bcec5aa269e2.zip
Diffstat (limited to 'src/CullZones.cpp')
-rw-r--r--src/CullZones.cpp34
1 files changed, 29 insertions, 5 deletions
diff --git a/src/CullZones.cpp b/src/CullZones.cpp
index f89d8256..6155ae57 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"
@@ -71,7 +72,6 @@ void
CCullZones::Update(void)
{
bool invisible;
- CVector v;
if(bCullZonesDisabled)
return;
@@ -95,7 +95,7 @@ CCullZones::Update(void)
case 6:
/* Update player attributes */
- CurrentFlags_Player = FindAttributesForCoors(FindPlayerCoors(v),
+ CurrentFlags_Player = FindAttributesForCoors(FindPlayerCoors(),
&CurrentWantedLevelDrop_Player);
break;
}
@@ -152,7 +152,7 @@ CCullZones::FindZoneWithStairsAttributeForPlayer(void)
int i;
CVector coors;
- FindPlayerCoors(coors);
+ coors = FindPlayerCoors();
for(i = 0; i < NumAttributeZones; i++)
if(aAttributeZones[i].attributes & ATTRZONE_STAIRS &&
coors.x >= aAttributeZones[i].minx && coors.x <= aAttributeZones[i].maxx &&
@@ -162,9 +162,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