2019-05-15 14:52:37 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Physical.h"
|
|
|
|
|
|
|
|
enum {
|
|
|
|
GAME_OBJECT = 1,
|
|
|
|
MISSION_OBJECT = 2,
|
|
|
|
TEMP_OBJECT = 3,
|
2019-06-12 18:07:37 +00:00
|
|
|
CUTSCENE_OBJECT = 4,
|
2019-05-15 14:52:37 +00:00
|
|
|
};
|
|
|
|
|
2019-06-19 16:35:51 +00:00
|
|
|
enum {
|
|
|
|
COLLRESPONSE_NONE,
|
|
|
|
COLLRESPONSE_CHANGE_MODEL,
|
|
|
|
COLLRESPONSE_SPLIT_MODEL,
|
|
|
|
COLLRESPONSE_SMASH_COMPLETELY,
|
|
|
|
COLLRESPONSE_CHANGE_THEN_SMASH,
|
|
|
|
COLLRESPONSE_UNKNOWN5,
|
|
|
|
|
|
|
|
COLLRESPONSE_SMASH_CARDBOARD_COMPLETELY = 50,
|
|
|
|
COLLRESPONSE_SMASH_WOODENBOX_COMPLETELY = 60,
|
|
|
|
COLLRESPONSE_SMASH_TRAFFICCONE_COMPLETELY = 70,
|
|
|
|
COLLRESPONSE_SMASH_BARPOST_COMPLETELY = 80,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2019-05-17 12:08:18 +00:00
|
|
|
class CVehicle;
|
|
|
|
|
2019-05-15 14:52:37 +00:00
|
|
|
class CObject : public CPhysical
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CMatrix m_objectMatrix;
|
|
|
|
float m_fUprootLimit;
|
|
|
|
int8 ObjectCreatedBy;
|
2019-06-30 19:06:55 +00:00
|
|
|
int8 bIsPickup : 1;
|
2019-05-15 14:52:37 +00:00
|
|
|
int8 m_obj_flag2 : 1;
|
|
|
|
int8 m_obj_flag4 : 1;
|
|
|
|
int8 m_obj_flag8 : 1;
|
|
|
|
int8 m_obj_flag10 : 1;
|
|
|
|
int8 bHasBeenDamaged : 1;
|
2019-06-12 18:07:37 +00:00
|
|
|
int8 bUseVehicleColours : 1;
|
2019-05-15 14:52:37 +00:00
|
|
|
int8 m_obj_flag80 : 1;
|
|
|
|
int8 field_172;
|
|
|
|
int8 field_173;
|
|
|
|
float m_fCollisionDamageMultiplier;
|
2019-06-19 16:35:51 +00:00
|
|
|
uint8 m_nCollisionDamageEffect;
|
|
|
|
uint8 m_nSpecialCollisionResponseCases;
|
|
|
|
bool m_bCameraToAvoidThisObject;
|
2019-05-15 14:52:37 +00:00
|
|
|
int8 field_17B;
|
|
|
|
int8 field_17C;
|
|
|
|
int8 field_17D;
|
|
|
|
int8 field_17E;
|
|
|
|
int8 field_17F;
|
|
|
|
int32 m_nEndOfLifeTime;
|
|
|
|
int16 m_nRefModelIndex;
|
|
|
|
int8 field_186;
|
|
|
|
int8 field_187;
|
|
|
|
CEntity *m_pCurSurface;
|
2019-05-19 19:28:10 +00:00
|
|
|
CEntity *m_pCollidingEntity;
|
2019-05-15 14:52:37 +00:00
|
|
|
int8 m_colour1, m_colour2;
|
|
|
|
|
2019-06-12 18:07:37 +00:00
|
|
|
static int16 &nNoTempObjects;
|
2019-07-09 07:57:44 +00:00
|
|
|
static int16 &nBodyCastHealth;
|
2019-06-12 18:07:37 +00:00
|
|
|
|
2019-05-15 14:52:37 +00:00
|
|
|
static void *operator new(size_t);
|
|
|
|
static void operator delete(void*, size_t);
|
|
|
|
|
2019-06-12 18:07:37 +00:00
|
|
|
CObject(void);
|
2019-07-25 20:34:29 +00:00
|
|
|
CObject(int32, bool);
|
2019-06-12 18:07:37 +00:00
|
|
|
~CObject(void);
|
|
|
|
|
|
|
|
void Render(void);
|
2019-07-06 10:27:21 +00:00
|
|
|
bool SetupLighting(void);
|
|
|
|
void RemoveLighting(bool reset);
|
2019-06-12 18:07:37 +00:00
|
|
|
|
2019-05-15 14:52:37 +00:00
|
|
|
void ObjectDamage(float amount);
|
2019-07-08 19:37:47 +00:00
|
|
|
void RefModelInfo(int32 modelId);
|
2019-07-25 20:34:29 +00:00
|
|
|
void Init(void);
|
2019-06-12 18:07:37 +00:00
|
|
|
|
2019-06-24 22:42:23 +00:00
|
|
|
static void DeleteAllTempObjectInArea(CVector, float);
|
2019-05-15 14:52:37 +00:00
|
|
|
};
|
|
|
|
static_assert(sizeof(CObject) == 0x198, "CObject: error");
|