2019-01-22 21:59:53 -08:00
|
|
|
#pragma once
|
|
|
|
|
2019-09-22 14:52:05 -07:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "Runtime/Weapon/CBeamProjectile.hpp"
|
2019-01-22 21:59:53 -08:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2019-01-22 21:59:53 -08:00
|
|
|
struct SElectricBeamInfo {
|
|
|
|
TToken<CElectricDescription> x0_electricDescription;
|
|
|
|
float x8_maxLength;
|
|
|
|
float xc_radius;
|
|
|
|
float x10_travelSpeed;
|
|
|
|
CAssetId x14_particleId;
|
2022-01-31 16:06:54 -08:00
|
|
|
float x18_fadeSpeed;
|
|
|
|
float x1c_damageInterval;
|
2019-01-22 21:59:53 -08:00
|
|
|
};
|
2020-04-21 19:04:37 -07:00
|
|
|
|
2019-01-22 21:59:53 -08:00
|
|
|
class CElectricBeamProjectile : public CBeamProjectile {
|
|
|
|
std::unique_ptr<CParticleElectric> x468_electric;
|
2020-04-21 19:04:37 -07:00
|
|
|
TCachedToken<CGenDescription> x46c_genDescription;
|
2019-01-22 21:59:53 -08:00
|
|
|
std::unique_ptr<CElementGen> x478_elementGen;
|
2022-01-31 16:06:54 -08:00
|
|
|
float x47c_fadeSpeed;
|
|
|
|
float x480_intensity;
|
|
|
|
float x484_damageTimer = 0.f;
|
|
|
|
float x488_damageInterval;
|
2019-01-22 21:59:53 -08:00
|
|
|
bool x48c_ = false;
|
|
|
|
|
|
|
|
public:
|
2021-05-26 07:00:57 -07:00
|
|
|
DEFINE_ENTITY
|
2019-01-22 21:59:53 -08:00
|
|
|
CElectricBeamProjectile(const TToken<CWeaponDescription>&, EWeaponType, const SElectricBeamInfo&,
|
|
|
|
const zeus::CTransform&, EMaterialTypes, const CDamageInfo&, TUniqueId, TAreaId, TUniqueId,
|
|
|
|
EProjectileAttrib);
|
|
|
|
|
2019-08-09 05:45:18 -07:00
|
|
|
void Accept(IVisitor&) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
|
|
|
void PreRender(CStateManager&, const zeus::CFrustum&) override;
|
|
|
|
void Touch(CActor&, CStateManager&) override {}
|
|
|
|
void UpdateFx(const zeus::CTransform&, float, CStateManager&) override;
|
|
|
|
void ResetBeam(CStateManager&, bool) override;
|
|
|
|
void Fire(const zeus::CTransform&, CStateManager&, bool) override;
|
2019-01-22 21:59:53 -08:00
|
|
|
};
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|