2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-04-25 05:46:28 +00:00
|
|
|
|
|
|
|
#include "CActor.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CScriptCoverPoint : public CActor
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool xe8_26_landHere : 1;
|
|
|
|
bool xe8_27_wallHang : 1;
|
|
|
|
bool xe8_28_stay : 1;
|
|
|
|
};
|
|
|
|
u32 xe8_flags;
|
|
|
|
};
|
|
|
|
|
|
|
|
float xec_cosHorizontalAngle;
|
|
|
|
float xf0_sinVerticalAngle;
|
|
|
|
float xf4_coverTime;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool xf8_24_crouch : 1;
|
|
|
|
bool xf8_25_inUse : 1;
|
|
|
|
};
|
|
|
|
u32 xf8_flags = 0;
|
|
|
|
};
|
|
|
|
TUniqueId xfa_occupant = kInvalidUniqueId;
|
2017-01-04 04:08:30 +00:00
|
|
|
TUniqueId xfc_retreating = kInvalidUniqueId;
|
2016-04-25 05:46:28 +00:00
|
|
|
std::experimental::optional<zeus::CAABox> x100_touchBounds;
|
|
|
|
float x11c_timeLeft = 0.f;
|
|
|
|
public:
|
2017-11-13 06:19:18 +00:00
|
|
|
CScriptCoverPoint(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
2016-04-25 05:46:28 +00:00
|
|
|
zeus::CTransform xf, bool active, u32 flags, bool crouch, float horizontalAngle, float verticalAngle, float coverTime);
|
|
|
|
|
2017-01-15 03:07:01 +00:00
|
|
|
void Accept(IVisitor& visitor);
|
2016-04-25 05:46:28 +00:00
|
|
|
void Think(float, CStateManager &);
|
2018-05-25 06:39:38 +00:00
|
|
|
void AddToRenderer(const zeus::CFrustum &, const CStateManager &) const {}
|
2016-04-25 05:46:28 +00:00
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager &);
|
2018-05-25 06:39:38 +00:00
|
|
|
void Render(const CStateManager &) const {}
|
2016-04-29 10:08:46 +00:00
|
|
|
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
|
2016-04-25 05:46:28 +00:00
|
|
|
void SetInUse(bool inUse);
|
|
|
|
bool GetInUse(TUniqueId uid) const;
|
|
|
|
bool ShouldLandHere() const;
|
|
|
|
bool ShouldWallHang() const;
|
|
|
|
bool ShouldStay() const;
|
|
|
|
bool ShouldCrouch() const;
|
|
|
|
bool Blown(const zeus::CVector3f& pos) const;
|
|
|
|
float GetSinSqVerticalAngle() const;
|
|
|
|
float GetCosHorizontalAngle() const;
|
|
|
|
u32 GetAttackDirection() const;
|
|
|
|
void Reserve(TUniqueId id);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|