2018-10-11 22:57:05 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include "Runtime/World/CPatterned.hpp"
|
2018-10-11 22:57:05 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde::MP1 {
|
|
|
|
class CFlickerBat final : public CPatterned {
|
2018-11-14 23:00:08 +00:00
|
|
|
public:
|
2019-02-08 07:56:54 +00:00
|
|
|
enum class EFlickerBatState { Visible, Hidden, FadeIn, FadeOut };
|
2018-11-14 23:00:08 +00:00
|
|
|
|
|
|
|
private:
|
2018-12-08 05:30:43 +00:00
|
|
|
float x568_ = 0.f;
|
|
|
|
float x56c_ = 0.f;
|
|
|
|
float x570_ = 0.f;
|
|
|
|
EFlickerBatState x574_state;
|
2019-02-08 07:56:54 +00:00
|
|
|
float x578_fadeRemTime = 1.f;
|
|
|
|
float x57c_ooFadeDur = 0.f;
|
2018-12-17 05:40:27 +00:00
|
|
|
bool x580_24_wasInXray : 1;
|
2018-12-08 05:30:43 +00:00
|
|
|
bool x580_25_heardShot : 1;
|
2019-02-08 07:56:54 +00:00
|
|
|
bool x580_26_inLOS : 1;
|
|
|
|
bool x580_27_enableLOSCheck : 1;
|
2018-11-14 23:00:08 +00:00
|
|
|
|
2018-12-17 05:40:27 +00:00
|
|
|
void NotifyNeighbors(CStateManager&);
|
|
|
|
void ToggleVisible(CStateManager&);
|
|
|
|
void SetHeardShot(bool heardShot) { x580_25_heardShot = heardShot; }
|
2019-01-31 20:44:05 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
public:
|
|
|
|
DEFINE_PATTERNED(FlickerBat)
|
|
|
|
CFlickerBat(TUniqueId, std::string_view name, EFlavorType, const CEntityInfo&, const zeus::CTransform&, CModelData&&,
|
|
|
|
const CPatternedInfo&, EColliderType, bool, const CActorParameters&, bool);
|
2018-11-14 23:00:08 +00:00
|
|
|
|
2019-08-09 19:46:49 +00:00
|
|
|
void Accept(IVisitor&) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
|
|
|
void Think(float, CStateManager&) override;
|
|
|
|
void Render(const CStateManager&) const override;
|
|
|
|
void Touch(CActor&, CStateManager&) override;
|
|
|
|
void DoUserAnimEvent(CStateManager&, const CInt32POINode&, EUserEventType, float dt) override;
|
|
|
|
void Death(CStateManager& mgr, const zeus::CVector3f& direction, EScriptObjectState state) override;
|
|
|
|
bool CanBeShot(const CStateManager&, int) override;
|
|
|
|
void Patrol(CStateManager&, EStateMsg, float) override;
|
|
|
|
void Attack(CStateManager&, EStateMsg, float) override;
|
|
|
|
void Shuffle(CStateManager&, EStateMsg, float) override;
|
|
|
|
void Taunt(CStateManager&, EStateMsg, float) override;
|
|
|
|
bool InPosition(CStateManager&, float) override;
|
|
|
|
bool HearShot(CStateManager&, float) override;
|
2018-11-14 23:00:08 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
EFlickerBatState GetFlickerBatState() const { return x574_state; }
|
|
|
|
void SetFlickerBatState(EFlickerBatState state, CStateManager&);
|
|
|
|
void FlickerBatStateChanged(EFlickerBatState, CStateManager&);
|
|
|
|
void CheckStaticIntersection(CStateManager&);
|
2018-10-11 22:57:05 +00:00
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde::MP1
|