Pool fixes

Mostly for Linux
This commit is contained in:
erorcun
2021-06-26 00:27:12 +03:00
parent af7573ddbe
commit 9b5caa190e
16 changed files with 71 additions and 49 deletions

View File

@ -29,10 +29,10 @@ bool CVehicle::bAltDodoCheat;
#endif
bool CVehicle::m_bDisableMouseSteering = true;
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); }
void *CVehicle::operator new(size_t sz) throw() { return CPools::GetVehiclePool()->New(); }
void *CVehicle::operator new(size_t sz, int handle) throw() { return CPools::GetVehiclePool()->New(handle); }
void CVehicle::operator delete(void *p, size_t sz) throw() { CPools::GetVehiclePool()->Delete((CVehicle*)p); }
void CVehicle::operator delete(void *p, int handle) throw() { CPools::GetVehiclePool()->Delete((CVehicle*)p); }
#ifdef FIX_BUGS
// I think they meant that

View File

@ -193,10 +193,10 @@ public:
float m_fSteerInput;
eVehicleType m_vehType;
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);
static void *operator new(size_t) throw();
static void *operator new(size_t sz, int slot) throw();
static void operator delete(void*, size_t) throw();
static void operator delete(void*, int) throw();
CVehicle(void) {} // FAKE
CVehicle(uint8 CreatedBy);