summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-06-30 15:20:11 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-06-30 15:20:11 +0200
commit90bcb888e8cd3f6580984c0248e474650c350007 (patch)
tree05606ed8c2ae842f7bd7a8f766d3d566e9e6f083 /src/entities
parentPlayBackThisFrameInterpolation and all it required... (diff)
downloadre3-90bcb888e8cd3f6580984c0248e474650c350007.tar
re3-90bcb888e8cd3f6580984c0248e474650c350007.tar.gz
re3-90bcb888e8cd3f6580984c0248e474650c350007.tar.bz2
re3-90bcb888e8cd3f6580984c0248e474650c350007.tar.lz
re3-90bcb888e8cd3f6580984c0248e474650c350007.tar.xz
re3-90bcb888e8cd3f6580984c0248e474650c350007.tar.zst
re3-90bcb888e8cd3f6580984c0248e474650c350007.zip
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/Ped.cpp1
-rw-r--r--src/entities/Ped.h1
-rw-r--r--src/entities/Vehicle.cpp3
-rw-r--r--src/entities/Vehicle.h1
4 files changed, 6 insertions, 0 deletions
diff --git a/src/entities/Ped.cpp b/src/entities/Ped.cpp
index a82d4fdc..85a588dc 100644
--- a/src/entities/Ped.cpp
+++ b/src/entities/Ped.cpp
@@ -30,6 +30,7 @@ CVector &CPed::offsetToOpenVanDoor = *(CVector*)0x62E048;
void *CPed::operator new(size_t sz) { return CPools::GetPedPool()->New(); }
void *CPed::operator new(size_t sz, int handle) { return CPools::GetPedPool()->New(handle); }
void CPed::operator delete(void *p, size_t sz) { CPools::GetPedPool()->Delete((CPed*)p); }
+void CPed::operator delete(void *p, int handle) { CPools::GetPedPool()->Delete((CPed*)p); }
CPed::~CPed(void)
{
diff --git a/src/entities/Ped.h b/src/entities/Ped.h
index 2edbd9e2..8f4939fc 100644
--- a/src/entities/Ped.h
+++ b/src/entities/Ped.h
@@ -272,6 +272,7 @@ public:
static void *operator new(size_t);
static void *operator new(size_t, int);
static void operator delete(void*, size_t);
+ static void operator delete(void*, int);
~CPed(void);
void FlagToDestroyWhenNextProcessed(void);
diff --git a/src/entities/Vehicle.cpp b/src/entities/Vehicle.cpp
index bcbaee32..8c1ef515 100644
--- a/src/entities/Vehicle.cpp
+++ b/src/entities/Vehicle.cpp
@@ -16,6 +16,7 @@ bool &CVehicle::bCheat5 = *(bool *)0x95CD64;
void *CVehicle::operator new(size_t sz) { return CPools::GetVehiclePool()->New(); }
void *CVehicle::operator new(size_t sz, int handle) { return CPools::GetVehiclePool()->New(handle); }
void CVehicle::operator delete(void *p, size_t sz) { CPools::GetVehiclePool()->Delete((CVehicle*)p); }
+void CVehicle::operator delete(void *p, int handle) { CPools::GetVehiclePool()->Delete((CVehicle*)p); }
CVehicle::~CVehicle()
{
@@ -25,6 +26,8 @@ CVehicle::~CVehicle()
m_audioEntityId = -5;
}
CRadar::ClearBlipForEntity(BLIP_CAR, CPools::GetVehiclePool()->GetIndex(this));
+ if (pDriver)
+ pDriver->FlagToDestroyWhenNextProcessed();
for (int i = 0; i < m_nNumMaxPassengers; i++){
if (pPassengers[i])
pPassengers[i]->FlagToDestroyWhenNextProcessed();
diff --git a/src/entities/Vehicle.h b/src/entities/Vehicle.h
index eed8f7a8..997720f6 100644
--- a/src/entities/Vehicle.h
+++ b/src/entities/Vehicle.h
@@ -113,6 +113,7 @@ public:
static void *operator new(size_t);
static void *operator new(size_t sz, int slot);
static void operator delete(void*, size_t);
+ static void operator delete(void*, int);
~CVehicle(void);