diff --git a/Runtime/Collision/CCollisionActor.cpp b/Runtime/Collision/CCollisionActor.cpp index de92e85bf..b6b5e4d38 100644 --- a/Runtime/Collision/CCollisionActor.cpp +++ b/Runtime/Collision/CCollisionActor.cpp @@ -65,7 +65,30 @@ CCollisionActor::CCollisionActor(TUniqueId uid1, TAreaId aId, TUniqueId uid2, bo void CCollisionActor::Accept(IVisitor& visitor) { visitor.Visit(this); } -void CCollisionActor::AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) {} +void CCollisionActor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) +{ + switch(msg) + { + case EScriptObjectMessage::ToggleActive: + case EScriptObjectMessage::Deleted: + case EScriptObjectMessage::Constructed: + break; + case EScriptObjectMessage::Alert: + case EScriptObjectMessage::InternalMessage10: + case EScriptObjectMessage::InternalMessage11: + { + CEntity* ent = mgr.ObjectById(x25c_owner); + if (ent) + mgr.SendScriptMsg(ent, x2fc_lastTouched, msg); + } + break; + default: + mgr.SendScriptMsgAlways(x25c_owner, x8_uid, msg); + break; + } + + CActor::AcceptScriptMsg(msg, uid, mgr); +} CHealthInfo* CCollisionActor::HealthInfo() { return &x28c_healthInfo; } diff --git a/Runtime/Collision/CCollisionActorManager.cpp b/Runtime/Collision/CCollisionActorManager.cpp index 9b101a2df..63316d683 100644 --- a/Runtime/Collision/CCollisionActorManager.cpp +++ b/Runtime/Collision/CCollisionActorManager.cpp @@ -7,4 +7,15 @@ CCollisionActorManager::CCollisionActorManager(CStateManager&, TUniqueId, TAreaI const std::vector&, bool) { } + +u32 CCollisionActorManager::GetNumCollisionActors() const +{ + return x0_jointDescriptions.size(); +} + +CJointCollisionDescription CCollisionActorManager::GetCollisionDescFromIndex(u32 idx) const +{ + return x0_jointDescriptions[idx]; +} + } diff --git a/Runtime/Collision/CCollisionActorManager.hpp b/Runtime/Collision/CCollisionActorManager.hpp index 822c66876..056f5a0a7 100644 --- a/Runtime/Collision/CCollisionActorManager.hpp +++ b/Runtime/Collision/CCollisionActorManager.hpp @@ -29,7 +29,7 @@ public: void SetActive(CStateManager&, bool); u32 GetNumCollisionActors() const; - CJointCollisionDescription GetCollisionDescFfromIndex(u32) const; + CJointCollisionDescription GetCollisionDescFromIndex(u32) const; zeus::CTransform GetWRLocatorTransform(const CAnimData&, CSegId, const zeus::CTransform&, const zeus::CTransform&); }; } diff --git a/Runtime/Collision/CJointCollisionDescription.hpp b/Runtime/Collision/CJointCollisionDescription.hpp index 68d5bde16..eb20f6a0a 100644 --- a/Runtime/Collision/CJointCollisionDescription.hpp +++ b/Runtime/Collision/CJointCollisionDescription.hpp @@ -19,6 +19,17 @@ public: }; private: + u32 x0_; + u32 x4_; + CSegId x8_; + CSegId x9_; + zeus::CVector3f xc_; + zeus::CVector3f x18_; + float x24_; + float x28_; + std::string x2c_; + TUniqueId x3c_; + float x40_; public: CJointCollisionDescription(ECollisionType, CSegId, CSegId, const zeus::CVector3f&, const zeus::CVector3f&, float, float, EOrientationType, const std::string&, float);