2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-02-21 03:29:28 +00:00
|
|
|
|
|
|
|
#include "World/CPhysicsActor.hpp"
|
2017-03-01 03:42:06 +00:00
|
|
|
#include "World/CHealthInfo.hpp"
|
|
|
|
#include "World/CDamageVulnerability.hpp"
|
2017-02-21 03:29:28 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
2017-03-03 22:13:23 +00:00
|
|
|
class CCollidableSphere;
|
|
|
|
class CCollidableOBBTreeGroup;
|
|
|
|
class CCollidableOBBTreeGroupContainer;
|
2017-02-21 03:29:28 +00:00
|
|
|
class CCollisionActor : public CPhysicsActor
|
|
|
|
{
|
2017-03-03 22:13:23 +00:00
|
|
|
enum class EPrimitiveType
|
|
|
|
{
|
|
|
|
OBBTreeGroup,
|
|
|
|
AABox,
|
|
|
|
Sphere
|
|
|
|
};
|
|
|
|
|
|
|
|
EPrimitiveType x258_primitiveType;
|
|
|
|
TUniqueId x25c_owner;
|
2017-03-01 03:42:06 +00:00
|
|
|
zeus::CVector3f x260_boxSize;
|
2017-03-03 22:13:23 +00:00
|
|
|
zeus::CVector3f x26c_;
|
|
|
|
std::unique_ptr<CCollidableOBBTreeGroupContainer> x278_obbContainer;
|
|
|
|
std::unique_ptr<CCollidableOBBTreeGroup> x27c_obbTreeGroupPrimitive;
|
|
|
|
std::unique_ptr<CCollidableAABox> x280_aaboxPrimitive;
|
|
|
|
std::unique_ptr<CCollidableSphere> x284_spherePrimitive;
|
2017-03-01 03:42:06 +00:00
|
|
|
float x288_sphereRadius;
|
|
|
|
CHealthInfo x28c_healthInfo = CHealthInfo(0.f);
|
|
|
|
CDamageVulnerability x294_damageVuln = CDamageVulnerability::NormalVulnerabilty();
|
2017-03-03 22:13:23 +00:00
|
|
|
TUniqueId x2fc_lastTouched = kInvalidUniqueId;
|
|
|
|
EWeaponCollisionResponseTypes x300_responseType = EWeaponCollisionResponseTypes::EnemyNormal;
|
|
|
|
zeus::CVector3f x304_extendedTouchBounds = zeus::CVector3f::skZero;
|
2017-02-21 03:29:28 +00:00
|
|
|
public:
|
|
|
|
CCollisionActor(TUniqueId, TAreaId, TUniqueId, const zeus::CVector3f&, const zeus::CVector3f&, bool, float);
|
|
|
|
CCollisionActor(TUniqueId, TAreaId, TUniqueId, const zeus::CVector3f&, bool, float);
|
|
|
|
CCollisionActor(TUniqueId, TAreaId, TUniqueId, bool, float, float);
|
2017-03-01 03:42:06 +00:00
|
|
|
|
2017-03-03 22:13:23 +00:00
|
|
|
void Accept(IVisitor &visitor);
|
2017-03-01 03:42:06 +00:00
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
2017-08-20 05:23:22 +00:00
|
|
|
CHealthInfo* HealthInfo(CStateManager&);
|
2017-03-01 03:42:06 +00:00
|
|
|
const CDamageVulnerability* GetDamageVulnerability() const;
|
|
|
|
const CDamageVulnerability* GetDamageVulnerability(const zeus::CVector3f&, const zeus::CVector3f&,
|
|
|
|
const CDamageInfo&) const;
|
2017-03-03 22:13:23 +00:00
|
|
|
void OnScanStateChanged(EScanState, CStateManager &);
|
|
|
|
|
|
|
|
void Touch(CActor &, CStateManager &);
|
|
|
|
zeus::CVector3f GetOrbitPosition(const CStateManager &) const;
|
|
|
|
const CCollisionPrimitive* GetCollisionPrimitive() const;
|
|
|
|
zeus::CTransform GetPrimitiveTransform() const;
|
2018-04-30 03:12:41 +00:00
|
|
|
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
|
2017-03-01 03:42:06 +00:00
|
|
|
void SetDamageVulnerability(const CDamageVulnerability& vuln);
|
2017-03-03 22:13:23 +00:00
|
|
|
const zeus::CVector3f& GetBoxSize() const { return x260_boxSize; }
|
|
|
|
TUniqueId GetOwnerId() const { return x25c_owner; }
|
|
|
|
TUniqueId GetLastTouchedObject() const { return x2fc_lastTouched; }
|
2018-05-25 06:39:38 +00:00
|
|
|
zeus::CVector3f GetScanObjectIndicatorPosition(const CStateManager &) const;
|
2017-03-03 22:13:23 +00:00
|
|
|
void SetExtendedTouchBounds(const zeus::CVector3f& boundExt) { x304_extendedTouchBounds = boundExt; }
|
2017-03-05 17:54:00 +00:00
|
|
|
float GetSphereRadius() const { return x288_sphereRadius; }
|
2017-02-21 03:29:28 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|