2019-05-15 14:52:37 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Physical.h"
|
|
|
|
|
|
|
|
enum {
|
2020-04-10 14:32:42 +00:00
|
|
|
UNKNOWN_OBJECT = 0,
|
2019-05-15 14:52:37 +00:00
|
|
|
GAME_OBJECT = 1,
|
|
|
|
MISSION_OBJECT = 2,
|
|
|
|
TEMP_OBJECT = 3,
|
2019-06-12 18:07:37 +00:00
|
|
|
CUTSCENE_OBJECT = 4,
|
2020-10-09 09:02:21 +00:00
|
|
|
CONTROLLED_SUB_OBJECT = 5,
|
2019-05-15 14:52:37 +00:00
|
|
|
};
|
|
|
|
|
2020-05-06 15:13:46 +00:00
|
|
|
enum CollisionSpecialResponseCase
|
|
|
|
{
|
2019-06-19 16:35:51 +00:00
|
|
|
COLLRESPONSE_NONE,
|
2020-05-06 15:13:46 +00:00
|
|
|
COLLRESPONSE_LAMPOST,
|
|
|
|
COLLRESPONSE_SMALLBOX,
|
|
|
|
COLLRESPONSE_BIGBOX,
|
|
|
|
COLLRESPONSE_FENCEPART,
|
|
|
|
COLLRESPONSE_UNKNOWN5
|
|
|
|
};
|
2019-06-19 16:35:51 +00:00
|
|
|
|
2020-05-06 15:13:46 +00:00
|
|
|
enum CollisionDamageEffect
|
|
|
|
{
|
|
|
|
DAMAGE_EFFECT_NONE,
|
|
|
|
DAMAGE_EFFECT_CHANGE_MODEL,
|
|
|
|
DAMAGE_EFFECT_SPLIT_MODEL,
|
2020-05-06 15:17:07 +00:00
|
|
|
DAMAGE_EFFECT_SMASH_AND_DAMAGE_TRAFFICLIGHTS,
|
|
|
|
|
|
|
|
DAMAGE_EFFECT_SMASH_COMPLETELY = 20,
|
2020-05-06 15:13:46 +00:00
|
|
|
DAMAGE_EFFECT_CHANGE_THEN_SMASH,
|
2019-06-19 16:35:51 +00:00
|
|
|
|
2020-05-06 15:13:46 +00:00
|
|
|
DAMAGE_EFFECT_SMASH_CARDBOARD_COMPLETELY = 50,
|
2020-05-06 15:17:07 +00:00
|
|
|
DAMAGE_EFFECT_SMASH_YELLOW_TARGET_COMPLETELY,
|
|
|
|
|
2020-05-06 15:13:46 +00:00
|
|
|
DAMAGE_EFFECT_SMASH_WOODENBOX_COMPLETELY = 60,
|
|
|
|
DAMAGE_EFFECT_SMASH_TRAFFICCONE_COMPLETELY = 70,
|
2020-05-06 15:17:07 +00:00
|
|
|
DAMAGE_EFFECT_SMASH_BARPOST_COMPLETELY = 80,
|
|
|
|
|
|
|
|
DAMAGE_EFFECT_SMASH_NEWSTANDNEW1 = 91,
|
|
|
|
DAMAGE_EFFECT_SMASH_NEWSTANDNEW21,
|
|
|
|
DAMAGE_EFFECT_SMASH_NEWSTANDNEW31,
|
|
|
|
DAMAGE_EFFECT_SMASH_NEWSTANDNEW41,
|
|
|
|
DAMAGE_EFFECT_SMASH_NEWSTANDNEW51,
|
|
|
|
|
|
|
|
DAMAGE_EFFECT_SMASH_BLACKBAG = 100,
|
|
|
|
DAMAGE_EFFECT_SMASH_VEGPALM = 110,
|
|
|
|
DAMAGE_EFFECT_BURST_BEACHBALL = 120,
|
|
|
|
DAMAGE_EFFECT_SMASH_BEACHLOUNGE_WOOD = 131,
|
|
|
|
DAMAGE_EFFECT_SMASH_BEACHLOUNGE_TOWEL,
|
2019-06-19 16:35:51 +00:00
|
|
|
};
|
|
|
|
|
2019-05-17 12:08:18 +00:00
|
|
|
class CVehicle;
|
2020-03-28 14:47:52 +00:00
|
|
|
class CDummyObject;
|
2019-05-17 12:08:18 +00:00
|
|
|
|
2019-05-15 14:52:37 +00:00
|
|
|
class CObject : public CPhysical
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CMatrix m_objectMatrix;
|
|
|
|
float m_fUprootLimit;
|
|
|
|
int8 ObjectCreatedBy;
|
2020-05-22 12:27:16 +00:00
|
|
|
uint8 bIsPickup : 1;
|
|
|
|
uint8 obj_flag_02 : 1;
|
|
|
|
uint8 bPickupObjWithMessage : 1;
|
|
|
|
uint8 bOutOfStock : 1;
|
|
|
|
uint8 bGlassCracked : 1;
|
|
|
|
uint8 bGlassBroken : 1;
|
|
|
|
uint8 bHasBeenDamaged : 1;
|
|
|
|
uint8 bUseVehicleColours : 1;
|
|
|
|
uint8 bIsWeapon : 1;
|
|
|
|
uint8 bIsStreetLight : 1;
|
2020-10-17 15:50:16 +00:00
|
|
|
int8 m_nBonusValue;
|
2020-10-18 09:34:34 +00:00
|
|
|
uint16 m_nCostValue;
|
2019-05-15 14:52:37 +00:00
|
|
|
float m_fCollisionDamageMultiplier;
|
2019-06-19 16:35:51 +00:00
|
|
|
uint8 m_nCollisionDamageEffect;
|
|
|
|
uint8 m_nSpecialCollisionResponseCases;
|
|
|
|
bool m_bCameraToAvoidThisObject;
|
2020-05-22 12:27:16 +00:00
|
|
|
int8 m_nBeachballBounces;
|
|
|
|
uint32 m_obj_unused1;
|
2020-03-07 19:22:43 +00:00
|
|
|
uint32 m_nEndOfLifeTime;
|
2019-05-15 14:52:37 +00:00
|
|
|
int16 m_nRefModelIndex;
|
|
|
|
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;
|
|
|
|
|
2020-04-17 05:54:14 +00:00
|
|
|
static int16 nNoTempObjects;
|
2020-05-19 18:56:42 +00:00
|
|
|
static float fDistToNearestTree;
|
2019-06-12 18:07:37 +00:00
|
|
|
|
2019-05-15 14:52:37 +00:00
|
|
|
static void *operator new(size_t);
|
2019-10-03 19:28:56 +00:00
|
|
|
static void *operator new(size_t, int);
|
2019-05-15 14:52:37 +00:00
|
|
|
static void operator delete(void*, size_t);
|
2019-10-03 19:28:56 +00:00
|
|
|
static void operator delete(void*, int);
|
2019-05-15 14:52:37 +00:00
|
|
|
|
2019-06-12 18:07:37 +00:00
|
|
|
CObject(void);
|
2019-07-25 20:34:29 +00:00
|
|
|
CObject(int32, bool);
|
2020-02-27 16:07:36 +00:00
|
|
|
CObject(CDummyObject*);
|
2019-06-12 18:07:37 +00:00
|
|
|
~CObject(void);
|
|
|
|
|
2020-01-01 20:55:01 +00:00
|
|
|
void ProcessControl(void);
|
2020-04-10 11:44:08 +00:00
|
|
|
void Teleport(CVector vecPos);
|
2019-06-12 18:07:37 +00:00
|
|
|
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);
|
2020-02-27 16:07:36 +00:00
|
|
|
bool CanBeDeleted(void);
|
2019-06-12 18:07:37 +00:00
|
|
|
|
2020-04-10 11:44:08 +00:00
|
|
|
static void DeleteAllMissionObjects();
|
|
|
|
static void DeleteAllTempObjects();
|
2020-04-16 18:46:08 +00:00
|
|
|
static void DeleteAllTempObjectsInArea(CVector point, float fRadius);
|
2019-05-15 14:52:37 +00:00
|
|
|
};
|
2020-05-18 22:49:09 +00:00
|
|
|
|
|
|
|
bool IsObjectPointerValid(CObject* pObject);
|