From a8f7bf0beca5c200bc3396312f0caaceacd27f94 Mon Sep 17 00:00:00 2001 From: saml1er Date: Fri, 10 Apr 2020 16:44:08 +0500 Subject: CObject complete --- src/objects/Object.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'src/objects/Object.h') diff --git a/src/objects/Object.h b/src/objects/Object.h index 27346e23..86fbe119 100644 --- a/src/objects/Object.h +++ b/src/objects/Object.h @@ -9,6 +9,18 @@ enum { CUTSCENE_OBJECT = 4, }; +enum { + COLDAMAGE_EFFECT_NONE = 0, + COLDAMAGE_EFFECT_CHANGE_MODEL = 1, + COLDAMAGE_EFFECT_SPLIT_MODEL = 2, + COLDAMAGE_EFFECT_SMASH_COMPLETELY = 3, + COLDAMAGE_EFFECT_CHANGE_THEN_SMASH = 4, + COLDAMAGE_EFFECT_SMASH_CARDBOX_COMPLETELY = 50, + COLDAMAGE_EFFECT_SMASH_WOODENBOX_COMPLETELY = 60, + COLDAMAGE_EFFECT_SMASH_TRAFFICCONE_COMPLETELY = 70, + COLDAMAGE_EFFECT_SMASH_BARPOST_COMPLETELY = 80, +}; + enum { COLLRESPONSE_NONE, COLLRESPONSE_CHANGE_MODEL, @@ -41,8 +53,8 @@ public: int8 bHasBeenDamaged : 1; int8 bUseVehicleColours : 1; int8 m_obj_flag80 : 1; - int8 field_172; // car for a bonus pickup? - int8 field_173; + int8 m_nBonusValue; + int8 field_173; float m_fCollisionDamageMultiplier; uint8 m_nCollisionDamageEffect; uint8 m_nSpecialCollisionResponseCases; @@ -74,7 +86,7 @@ public: ~CObject(void); void ProcessControl(void); - void Teleport(CVector); + void Teleport(CVector vecPos); void Render(void); bool SetupLighting(void); void RemoveLighting(bool reset); @@ -84,6 +96,8 @@ public: void Init(void); bool CanBeDeleted(void); - static void DeleteAllTempObjectInArea(CVector, float); + static void DeleteAllMissionObjects(); + static void DeleteAllTempObjects(); + static void DeleteAllTempObjectInArea(CVector point, float fRadius); }; static_assert(sizeof(CObject) == 0x198, "CObject: error"); -- cgit v1.2.3 From bb21cff6390bbbbf81fd1a9ed0add69e2a4adc88 Mon Sep 17 00:00:00 2001 From: saml1er Date: Fri, 10 Apr 2020 17:03:02 +0500 Subject: Fix Object.h and Object.cpp indentation --- src/objects/Object.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/objects/Object.h') diff --git a/src/objects/Object.h b/src/objects/Object.h index 86fbe119..d51c9f61 100644 --- a/src/objects/Object.h +++ b/src/objects/Object.h @@ -59,15 +59,15 @@ public: uint8 m_nCollisionDamageEffect; uint8 m_nSpecialCollisionResponseCases; bool m_bCameraToAvoidThisObject; - int8 field_17B; - int8 field_17C; - int8 field_17D; - int8 field_17E; - int8 field_17F; + int8 field_17B; + int8 field_17C; + int8 field_17D; + int8 field_17E; + int8 field_17F; uint32 m_nEndOfLifeTime; int16 m_nRefModelIndex; - int8 field_186; - int8 field_187; + int8 field_186; + int8 field_187; CEntity *m_pCurSurface; CEntity *m_pCollidingEntity; int8 m_colour1, m_colour2; -- cgit v1.2.3 From 5544325acb108da13a3d858b38c2096f500d0add Mon Sep 17 00:00:00 2001 From: saml1er Date: Fri, 10 Apr 2020 19:32:42 +0500 Subject: Refactor CObject::ObjectDamage --- src/objects/Object.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/objects/Object.h') diff --git a/src/objects/Object.h b/src/objects/Object.h index d51c9f61..6d04c78a 100644 --- a/src/objects/Object.h +++ b/src/objects/Object.h @@ -3,6 +3,7 @@ #include "Physical.h" enum { + UNKNOWN_OBJECT = 0, GAME_OBJECT = 1, MISSION_OBJECT = 2, TEMP_OBJECT = 3, -- cgit v1.2.3