2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-05-03 08:27:28 +00:00
|
|
|
|
2019-09-23 19:00:23 +00:00
|
|
|
#include <string_view>
|
|
|
|
|
|
|
|
#include "Runtime/GCNTypes.hpp"
|
|
|
|
#include "Runtime/World/CActor.hpp"
|
|
|
|
#include "Runtime/World/CDamageVulnerability.hpp"
|
|
|
|
#include "Runtime/World/CFluidPlaneDoor.hpp"
|
|
|
|
#include "Runtime/World/CHealthInfo.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CAABox.hpp>
|
|
|
|
#include <zeus/CFrustum.hpp>
|
|
|
|
#include <zeus/CTransform.hpp>
|
|
|
|
#include <zeus/CVector3f.hpp>
|
2016-05-03 08:27:28 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2016-05-03 08:27:28 +00:00
|
|
|
class CVisorParameters;
|
2019-09-23 19:00:23 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CScriptDamageableTrigger : public CActor {
|
2020-04-06 08:48:08 +00:00
|
|
|
private:
|
2018-12-08 05:30:43 +00:00
|
|
|
zeus::CFrustum xe8_frustum;
|
|
|
|
zeus::CAABox x14c_bounds;
|
|
|
|
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;
|
2020-04-10 01:46:54 +00:00
|
|
|
CFluidPlaneDoor x254_fluidPlane;
|
2018-12-08 05:30:43 +00:00
|
|
|
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;
|
2017-08-14 03:55:06 +00:00
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
u32 _dummy = 0;
|
|
|
|
};
|
|
|
|
void SetLinkedObjectAlpha(float a, CStateManager& mgr);
|
|
|
|
float GetPuddleAlphaScale() const;
|
|
|
|
|
2016-05-03 08:27:28 +00:00
|
|
|
public:
|
2020-04-06 08:48:08 +00:00
|
|
|
enum class ECanOrbit {
|
|
|
|
NoOrbit,
|
|
|
|
Orbit,
|
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CScriptDamageableTrigger(TUniqueId uid, std::string_view name, const CEntityInfo& info,
|
|
|
|
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
|
|
|
|
2019-08-09 12:45:18 +00:00
|
|
|
void Accept(IVisitor& visitor) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
2018-12-08 05:30:43 +00:00
|
|
|
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
|
2019-08-09 12:45:18 +00:00
|
|
|
const CWeaponMode&, EProjectileAttrib) const override;
|
2020-04-09 17:28:20 +00:00
|
|
|
void Render(CStateManager& mgr) override;
|
2020-04-05 11:54:02 +00:00
|
|
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
2019-08-09 12:45:18 +00:00
|
|
|
void PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) override;
|
|
|
|
const CDamageVulnerability* GetDamageVulnerability() const override { return &x174_dVuln; }
|
|
|
|
CHealthInfo* HealthInfo(CStateManager&) override { return &x16c_hInfo; }
|
|
|
|
void Think(float, CStateManager&) override;
|
|
|
|
std::optional<zeus::CAABox> GetTouchBounds() const override;
|
2016-05-03 08:27:28 +00:00
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|