2019-01-23 05:59:53 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-09-22 21:52:05 +00:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "Runtime/Weapon/CBeamProjectile.hpp"
|
2019-01-23 05:59:53 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2019-01-23 05:59:53 +00:00
|
|
|
struct SElectricBeamInfo {
|
|
|
|
TToken<CElectricDescription> x0_electricDescription;
|
|
|
|
float x8_maxLength;
|
|
|
|
float xc_radius;
|
|
|
|
float x10_travelSpeed;
|
|
|
|
CAssetId x14_particleId;
|
2022-02-01 00:06:54 +00:00
|
|
|
float x18_fadeSpeed;
|
|
|
|
float x1c_damageInterval;
|
2019-01-23 05:59:53 +00:00
|
|
|
};
|
2020-04-22 02:04:37 +00:00
|
|
|
|
2019-01-23 05:59:53 +00:00
|
|
|
class CElectricBeamProjectile : public CBeamProjectile {
|
|
|
|
std::unique_ptr<CParticleElectric> x468_electric;
|
2020-04-22 02:04:37 +00:00
|
|
|
TCachedToken<CGenDescription> x46c_genDescription;
|
2019-01-23 05:59:53 +00:00
|
|
|
std::unique_ptr<CElementGen> x478_elementGen;
|
2022-02-01 00:06:54 +00:00
|
|
|
float x47c_fadeSpeed;
|
|
|
|
float x480_intensity;
|
|
|
|
float x484_damageTimer = 0.f;
|
|
|
|
float x488_damageInterval;
|
2019-01-23 05:59:53 +00:00
|
|
|
bool x48c_ = false;
|
|
|
|
|
|
|
|
public:
|
2021-05-26 14:00:57 +00:00
|
|
|
DEFINE_ENTITY
|
2019-01-23 05:59:53 +00:00
|
|
|
CElectricBeamProjectile(const TToken<CWeaponDescription>&, EWeaponType, const SElectricBeamInfo&,
|
|
|
|
const zeus::CTransform&, EMaterialTypes, const CDamageInfo&, TUniqueId, TAreaId, TUniqueId,
|
|
|
|
EProjectileAttrib);
|
|
|
|
|
2019-08-09 12:45:18 +00: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-23 05:59:53 +00:00
|
|
|
};
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|