2019-05-15 10:52:37 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Physical.h"
|
|
|
|
|
|
|
|
enum {
|
2020-04-10 10:32:42 -04:00
|
|
|
UNKNOWN_OBJECT = 0,
|
2019-05-15 10:52:37 -04:00
|
|
|
GAME_OBJECT = 1,
|
|
|
|
MISSION_OBJECT = 2,
|
|
|
|
TEMP_OBJECT = 3,
|
2019-06-12 14:07:37 -04:00
|
|
|
CUTSCENE_OBJECT = 4,
|
2019-05-15 10:52:37 -04:00
|
|
|
};
|
|
|
|
|
2020-05-06 11:13:46 -04:00
|
|
|
enum CollisionSpecialResponseCase
|
|
|
|
{
|
2019-06-19 12:35:51 -04:00
|
|
|
COLLRESPONSE_NONE,
|
2020-05-06 11:13:46 -04:00
|
|
|
COLLRESPONSE_LAMPOST,
|
|
|
|
COLLRESPONSE_SMALLBOX,
|
|
|
|
COLLRESPONSE_BIGBOX,
|
|
|
|
COLLRESPONSE_FENCEPART,
|
|
|
|
COLLRESPONSE_UNKNOWN5
|
|
|
|
};
|
2019-06-19 12:35:51 -04:00
|
|
|
|
2020-05-06 11:13:46 -04:00
|
|
|
enum CollisionDamageEffect
|
|
|
|
{
|
|
|
|
DAMAGE_EFFECT_NONE,
|
|
|
|
DAMAGE_EFFECT_CHANGE_MODEL,
|
|
|
|
DAMAGE_EFFECT_SPLIT_MODEL,
|
|
|
|
DAMAGE_EFFECT_SMASH_COMPLETELY,
|
|
|
|
DAMAGE_EFFECT_CHANGE_THEN_SMASH,
|
2019-06-19 12:35:51 -04:00
|
|
|
|
2020-05-06 11:13:46 -04:00
|
|
|
DAMAGE_EFFECT_SMASH_CARDBOARD_COMPLETELY = 50,
|
|
|
|
DAMAGE_EFFECT_SMASH_WOODENBOX_COMPLETELY = 60,
|
|
|
|
DAMAGE_EFFECT_SMASH_TRAFFICCONE_COMPLETELY = 70,
|
|
|
|
DAMAGE_EFFECT_SMASH_BARPOST_COMPLETELY = 80
|
2019-06-19 12:35:51 -04:00
|
|
|
};
|
|
|
|
|
2019-05-17 08:08:18 -04:00
|
|
|
class CVehicle;
|
2020-03-28 10:47:52 -04:00
|
|
|
class CDummyObject;
|
2019-05-17 08:08:18 -04:00
|
|
|
|
2019-05-15 10:52:37 -04:00
|
|
|
class CObject : public CPhysical
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CMatrix m_objectMatrix;
|
|
|
|
float m_fUprootLimit;
|
|
|
|
int8 ObjectCreatedBy;
|
2019-06-30 15:06:55 -04:00
|
|
|
int8 bIsPickup : 1;
|
2020-04-19 00:14:13 -04:00
|
|
|
int8 bPickupObjWithMessage : 1;
|
2019-10-03 15:28:56 -04:00
|
|
|
int8 bOutOfStock : 1;
|
2020-04-01 17:04:56 -04:00
|
|
|
int8 bGlassCracked : 1;
|
|
|
|
int8 bGlassBroken : 1;
|
2019-05-15 10:52:37 -04:00
|
|
|
int8 bHasBeenDamaged : 1;
|
2019-06-12 14:07:37 -04:00
|
|
|
int8 bUseVehicleColours : 1;
|
2020-04-10 07:44:08 -04:00
|
|
|
int8 m_nBonusValue;
|
2019-05-15 10:52:37 -04:00
|
|
|
float m_fCollisionDamageMultiplier;
|
2019-06-19 12:35:51 -04:00
|
|
|
uint8 m_nCollisionDamageEffect;
|
|
|
|
uint8 m_nSpecialCollisionResponseCases;
|
|
|
|
bool m_bCameraToAvoidThisObject;
|
2020-04-18 04:31:53 -04:00
|
|
|
|
|
|
|
// this batch is unused
|
2020-04-10 08:03:02 -04:00
|
|
|
int8 field_17B;
|
|
|
|
int8 field_17C;
|
|
|
|
int8 field_17D;
|
|
|
|
int8 field_17E;
|
|
|
|
int8 field_17F;
|
2020-04-18 04:31:53 -04:00
|
|
|
|
2020-03-07 14:22:43 -05:00
|
|
|
uint32 m_nEndOfLifeTime;
|
2019-05-15 10:52:37 -04:00
|
|
|
int16 m_nRefModelIndex;
|
|
|
|
CEntity *m_pCurSurface;
|
2019-05-19 15:28:10 -04:00
|
|
|
CEntity *m_pCollidingEntity;
|
2019-05-15 10:52:37 -04:00
|
|
|
int8 m_colour1, m_colour2;
|
|
|
|
|
2020-04-17 01:54:14 -04:00
|
|
|
static int16 nNoTempObjects;
|
|
|
|
static int16 nBodyCastHealth;
|
2019-06-12 14:07:37 -04:00
|
|
|
|
2019-05-15 10:52:37 -04:00
|
|
|
static void *operator new(size_t);
|
2019-10-03 15:28:56 -04:00
|
|
|
static void *operator new(size_t, int);
|
2019-05-15 10:52:37 -04:00
|
|
|
static void operator delete(void*, size_t);
|
2019-10-03 15:28:56 -04:00
|
|
|
static void operator delete(void*, int);
|
2019-05-15 10:52:37 -04:00
|
|
|
|
2019-06-12 14:07:37 -04:00
|
|
|
CObject(void);
|
2019-07-25 16:34:29 -04:00
|
|
|
CObject(int32, bool);
|
2020-02-27 11:07:36 -05:00
|
|
|
CObject(CDummyObject*);
|
2019-06-12 14:07:37 -04:00
|
|
|
~CObject(void);
|
|
|
|
|
2020-01-01 15:55:01 -05:00
|
|
|
void ProcessControl(void);
|
2020-04-10 07:44:08 -04:00
|
|
|
void Teleport(CVector vecPos);
|
2019-06-12 14:07:37 -04:00
|
|
|
void Render(void);
|
2019-07-06 06:27:21 -04:00
|
|
|
bool SetupLighting(void);
|
|
|
|
void RemoveLighting(bool reset);
|
2019-06-12 14:07:37 -04:00
|
|
|
|
2019-05-15 10:52:37 -04:00
|
|
|
void ObjectDamage(float amount);
|
2019-07-08 15:37:47 -04:00
|
|
|
void RefModelInfo(int32 modelId);
|
2019-07-25 16:34:29 -04:00
|
|
|
void Init(void);
|
2020-02-27 11:07:36 -05:00
|
|
|
bool CanBeDeleted(void);
|
2019-06-12 14:07:37 -04:00
|
|
|
|
2020-04-10 07:44:08 -04:00
|
|
|
static void DeleteAllMissionObjects();
|
|
|
|
static void DeleteAllTempObjects();
|
2020-04-16 14:46:08 -04:00
|
|
|
static void DeleteAllTempObjectsInArea(CVector point, float fRadius);
|
2019-05-15 10:52:37 -04:00
|
|
|
};
|
|
|
|
static_assert(sizeof(CObject) == 0x198, "CObject: error");
|