2016-05-03 08:27:28 +00:00
|
|
|
#ifndef CSCRIPTDAMAGEABLETRIGGER_HPP
|
|
|
|
#define CSCRIPTDAMAGEABLETRIGGER_HPP
|
|
|
|
|
|
|
|
#include "CActor.hpp"
|
2017-08-14 03:55:06 +00:00
|
|
|
#include "CFluidPlaneDoor.hpp"
|
|
|
|
#include "CHealthInfo.hpp"
|
|
|
|
#include "CDamageVulnerability.hpp"
|
2016-05-03 08:27:28 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CVisorParameters;
|
|
|
|
class CScriptDamageableTrigger : public CActor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum class ECanOrbit
|
|
|
|
{
|
|
|
|
NoOrbit,
|
|
|
|
Orbit,
|
|
|
|
};
|
|
|
|
|
2017-08-14 03:55:06 +00:00
|
|
|
zeus::CFrustum xe8_frustum;
|
2016-05-03 08:27:28 +00:00
|
|
|
zeus::CAABox x14c_bounds;
|
2017-08-14 03:55:06 +00:00
|
|
|
CHealthInfo x164_origHInfo;
|
|
|
|
CHealthInfo x16c_hInfo;
|
|
|
|
CDamageVulnerability x174_dVuln;
|
|
|
|
u32 x1dc_faceFlag;
|
|
|
|
float x1e0_alpha = 1.f;
|
|
|
|
zeus::CTransform x1e4_faceDir;
|
|
|
|
zeus::CTransform x214_faceDirInv;
|
|
|
|
zeus::CVector3f x244_faceTranslate;
|
|
|
|
float x250_alphaTimer = 0.f;
|
|
|
|
CFluidPlaneDoor x254_fluidPlane;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool x300_24_notOccluded : 1;
|
|
|
|
bool x300_25_alphaOut : 1;
|
|
|
|
bool x300_26_outOfFrustum : 1;
|
|
|
|
bool x300_27_invulnerable : 1;
|
|
|
|
bool x300_28_canOrbit : 1;
|
|
|
|
};
|
|
|
|
u32 _dummy = 0;
|
|
|
|
};
|
|
|
|
void SetLinkedObjectAlpha(float a, CStateManager& mgr);
|
|
|
|
float GetPuddleAlphaScale() const;
|
2016-05-03 08:27:28 +00:00
|
|
|
public:
|
2017-11-13 06:19:18 +00:00
|
|
|
CScriptDamageableTrigger(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
2017-08-14 03:55:06 +00:00
|
|
|
const zeus::CVector3f& position, const zeus::CVector3f& extent,
|
|
|
|
const CHealthInfo& hInfo, const CDamageVulnerability& dVuln,
|
|
|
|
u32 faceFlag, CAssetId patternTex1, CAssetId patternTex2,
|
|
|
|
CAssetId colorTex, ECanOrbit canOrbit, bool active,
|
|
|
|
const CVisorParameters& vParams);
|
2017-01-15 03:07:01 +00:00
|
|
|
|
|
|
|
void Accept(IVisitor& visitor);
|
2017-08-14 03:55:06 +00:00
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
|
|
|
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
2018-02-12 05:30:21 +00:00
|
|
|
const CWeaponMode&, EProjectileAttrib) const;
|
2017-08-14 03:55:06 +00:00
|
|
|
void Render(const CStateManager& mgr) const;
|
|
|
|
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const;
|
|
|
|
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum);
|
|
|
|
const CDamageVulnerability* GetDamageVulnerability() const { return &x174_dVuln; }
|
2017-08-20 05:23:22 +00:00
|
|
|
CHealthInfo* HealthInfo(CStateManager&) { return &x16c_hInfo; }
|
2017-08-14 03:55:06 +00:00
|
|
|
void Think(float, CStateManager&);
|
2018-04-30 03:12:41 +00:00
|
|
|
std::experimental::optional<zeus::CAABox> GetTouchBounds() const;
|
2016-05-03 08:27:28 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // CSCRIPTDAMAGEABLETRIGGER_HPP
|