mirror of
https://github.com/halpz/re3.git
synced 2025-06-29 11:36:25 +00:00
garages part 1
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
#include "Renderer.h"
|
||||
#include "DMAudio.h"
|
||||
#include "Radar.h"
|
||||
#include "Darkel.h"
|
||||
|
||||
bool &CVehicle::bWheelsOnlyCheat = *(bool *)0x95CD78;
|
||||
bool &CVehicle::bAllDodosCheat = *(bool *)0x95CD75;
|
||||
@ -763,6 +764,29 @@ CVehicle::IsSphereTouchingVehicle(float sx, float sy, float sz, float radius)
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
DestroyVehicleAndDriverAndPassengers(CVehicle* pVehicle)
|
||||
{
|
||||
if (pVehicle->pDriver) {
|
||||
#ifndef FIX_BUGS
|
||||
// this just isn't fair
|
||||
CDarkel::RegisterKillByPlayer(pVehicle->pDriver, WEAPONTYPE_UNIDENTIFIED);
|
||||
#endif
|
||||
pVehicle->pDriver->FlagToDestroyWhenNextProcessed();
|
||||
}
|
||||
for (int i = 0; i < pVehicle->m_nNumMaxPassengers; i++) {
|
||||
if (pVehicle->pPassengers[i]) {
|
||||
#ifndef FIX_BUGS
|
||||
// this just isn't fair
|
||||
CDarkel::RegisterKillByPlayer(pVehicle->pPassengers[i], WEAPONTYPE_UNIDENTIFIED);
|
||||
#endif
|
||||
pVehicle->pPassengers[i]->FlagToDestroyWhenNextProcessed();
|
||||
}
|
||||
}
|
||||
CWorld::Remove(pVehicle);
|
||||
delete pVehicle;
|
||||
}
|
||||
|
||||
|
||||
class CVehicle_ : public CVehicle
|
||||
{
|
||||
|
@ -300,3 +300,5 @@ public:
|
||||
};
|
||||
|
||||
static_assert(sizeof(cVehicleParams) == 0x18, "cVehicleParams: error");
|
||||
|
||||
void DestroyVehicleAndDriverAndPassengers(CVehicle* pVehicle);
|
||||
|
Reference in New Issue
Block a user