metaforce/Runtime/MP1/World/CAtomicBeta.hpp

67 lines
2.3 KiB
C++
Raw Permalink Normal View History

#pragma once
#include <string_view>
#include "Runtime/rstl.hpp"
#include "Runtime/World/CPatterned.hpp"
#include <zeus/CVector3f.hpp>
2021-04-10 08:42:06 +00:00
namespace metaforce {
class CWeaponDescription;
}
2021-04-10 08:42:06 +00:00
namespace metaforce::MP1 {
class CAtomicBeta final : public CPatterned {
static constexpr u32 kBombCount = 3;
rstl::reserved_vector<TUniqueId, kBombCount> x568_projectileIds;
bool x574_beamFired = false;
2020-08-24 07:59:30 +00:00
float x578_minSpeed;
float x57c_maxSpeed;
float x580_speedStep;
float x584_currentSpeed;
CDamageVulnerability x588_frozenDamage;
2020-08-24 07:59:30 +00:00
float x5f0_moveSpeed;
zeus::CVector3f x5f4_;
TToken<CElectricDescription> x600_electricWeapon;
TToken<CWeaponDescription> x608_;
CDamageInfo x610_projectileDamage;
CAssetId x62c_beamParticle;
2022-02-01 00:06:54 +00:00
float x630_beamFadeSpeed;
float x634_beamRadius;
2022-02-01 00:06:54 +00:00
float x638_beamDamageInterval;
float x63c_ = 1.f;
float x640_ = 10.f;
u16 x644_;
u16 x646_;
u16 x648_;
CSfxHandle x64c_;
CSfxHandle x650_;
CSfxHandle x654_;
void CreateBeams(CStateManager&);
void UpdateBeams(CStateManager&, bool);
void FreeBeams(CStateManager&);
void UpdateOrCreateEmitter(CSfxHandle&, u16, const zeus::CVector3f&, float);
void DestroyEmitter(CSfxHandle&);
public:
DEFINE_PATTERNED(AtomicBeta);
CAtomicBeta(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&,
const CActorParameters&, const CPatternedInfo&, CAssetId, CAssetId, const CDamageInfo&, CAssetId, float,
float, float, const CDamageVulnerability&, float, float, float, s16, s16, s16, float);
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
void Think(float, CStateManager&) override;
const CDamageVulnerability* GetDamageVulnerability() const override;
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
const CWeaponMode& mode, EProjectileAttrib) const override {
return GetDamageVulnerability()->WeaponHits(mode, false) ? EWeaponCollisionResponseTypes::AtomicBeta
: EWeaponCollisionResponseTypes::AtomicBetaReflect;
}
void Death(CStateManager&, const zeus::CVector3f&, EScriptObjectState) override;
static bool IsPlayerBeamChargedEnough(const CStateManager& mgr);
};
2021-04-10 08:42:06 +00:00
} // namespace metaforce::MP1