2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-06-12 04:23:34 +00:00
|
|
|
|
|
|
|
#include "CGameProjectile.hpp"
|
|
|
|
#include "Camera/CCameraShakeData.hpp"
|
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce {
|
2017-06-12 04:23:34 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CEnergyProjectile : public CGameProjectile {
|
|
|
|
CSfxHandle x2e8_sfx;
|
|
|
|
zeus::CVector3f x2ec_dir;
|
|
|
|
float x2f8_mag;
|
|
|
|
CCameraShakeData x2fc_camShake;
|
2020-09-26 13:41:50 +00:00
|
|
|
bool x3d0_24_dead : 1 = false;
|
|
|
|
bool x3d0_25_ : 1 = false;
|
|
|
|
bool x3d0_26_ : 1 = false;
|
|
|
|
bool x3d0_27_camShakeDirty : 1 = false;
|
2018-12-08 05:30:43 +00:00
|
|
|
float x3d4_curTime = 0.f;
|
|
|
|
void StopProjectile(CStateManager& mgr);
|
|
|
|
|
2017-06-12 04:23:34 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CEnergyProjectile(bool active, const TToken<CWeaponDescription>& desc, EWeaponType type, const zeus::CTransform& xf,
|
|
|
|
EMaterialTypes excludeMat, const CDamageInfo& damage, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
|
|
|
TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater, const zeus::CVector3f& scale,
|
2019-06-12 02:05:17 +00:00
|
|
|
const std::optional<TLockedToken<CGenDescription>>& visorParticle, u16 visorSfx,
|
2018-12-08 05:30:43 +00:00
|
|
|
bool sendCollideMsg);
|
|
|
|
void SetCameraShake(const CCameraShakeData& data) {
|
|
|
|
x2fc_camShake = data;
|
|
|
|
x3d0_27_camShakeDirty = true;
|
|
|
|
}
|
|
|
|
void PlayImpactSound(const zeus::CVector3f& pos, EWeaponCollisionResponseTypes type);
|
|
|
|
void ChangeProjectileOwner(TUniqueId owner, CStateManager& mgr);
|
2020-09-26 05:48:18 +00:00
|
|
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr) override;
|
|
|
|
void Accept(IVisitor& visitor) override;
|
2018-12-08 05:30:43 +00:00
|
|
|
void ResolveCollisionWithWorld(const CRayCastResult& res, CStateManager& mgr);
|
2020-09-26 05:48:18 +00:00
|
|
|
void ResolveCollisionWithActor(const CRayCastResult& res, CActor& act, CStateManager& mgr) override;
|
|
|
|
void Think(float dt, CStateManager& mgr) override;
|
|
|
|
void Render(CStateManager& mgr) override;
|
|
|
|
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
|
|
|
|
void Touch(CActor& act, CStateManager& mgr) override;
|
2018-12-08 05:30:43 +00:00
|
|
|
virtual bool Explode(const zeus::CVector3f& pos, const zeus::CVector3f& normal, EWeaponCollisionResponseTypes type,
|
|
|
|
CStateManager& mgr, const CDamageVulnerability& dVuln, TUniqueId hitActor);
|
2019-05-10 02:33:56 +00:00
|
|
|
void Set3d0_26(bool v) { x3d0_26_ = v; }
|
2017-06-12 04:23:34 +00:00
|
|
|
};
|
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce
|