metaforce/Runtime/Weapon/CEnergyProjectile.hpp

52 lines
2.1 KiB
C++
Raw Normal View History

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"
namespace urde
{
class CEnergyProjectile : public CGameProjectile
{
2018-02-11 05:27:00 +00:00
CSfxHandle x2e8_sfx;
2017-06-12 04:23:34 +00:00
zeus::CVector3f x2ec_dir;
float x2f8_mag;
CCameraShakeData x2fc_camShake;
union
{
struct
{
2018-02-12 05:30:21 +00:00
bool x3d0_24_dead : 1;
2017-06-12 04:23:34 +00:00
bool x3d0_25_ : 1;
bool x3d0_26_ : 1;
2017-09-10 00:36:21 +00:00
bool x3d0_27_camShakeDirty : 1;
2017-06-12 04:23:34 +00:00
};
u32 _dummy = 0;
};
2018-02-12 05:30:21 +00:00
float x3d4_curTime = 0.f;
2018-02-11 05:27:00 +00:00
void StopProjectile(CStateManager& mgr);
2017-06-12 04:23:34 +00:00
public:
CEnergyProjectile(bool active, const TToken<CWeaponDescription>& desc, EWeaponType type,
2018-03-15 00:27:45 +00:00
const zeus::CTransform& xf, EMaterialTypes excludeMat, const CDamageInfo& damage,
2017-09-05 03:00:19 +00:00
TUniqueId uid, TAreaId aid, TUniqueId owner, TUniqueId homingTarget,
EProjectileAttrib attribs, bool underwater, const zeus::CVector3f& scale,
const std::experimental::optional<TLockedToken<CGenDescription>>& visorParticle,
2018-02-11 05:27:00 +00:00
u16 visorSfx, bool sendCollideMsg);
2017-09-10 00:36:21 +00:00
void SetCameraShake(const CCameraShakeData& data) { x2fc_camShake = data; x3d0_27_camShakeDirty = true; }
2018-02-11 05:27:00 +00:00
void PlayImpactSound(const zeus::CVector3f& pos, EWeaponCollisionResponseTypes type);
void ChangeProjectileOwner(TUniqueId owner, CStateManager& mgr);
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CStateManager& mgr);
void Accept(IVisitor& visitor);
void ResolveCollisionWithWorld(const CRayCastResult& res, CStateManager& mgr);
void ResolveCollisionWithActor(const CRayCastResult& res, CActor& act, CStateManager& mgr);
void Think(float dt, CStateManager& mgr);
void Render(const CStateManager& mgr) const;
void AddToRenderer(const zeus::CFrustum& frustum, const CStateManager& mgr) const;
void Touch(CActor& act, CStateManager& mgr);
2018-02-12 05:30:21 +00:00
virtual bool Explode(const zeus::CVector3f& pos, const zeus::CVector3f& normal, EWeaponCollisionResponseTypes type,
CStateManager& mgr, const CDamageVulnerability& dVuln, TUniqueId hitActor);
2017-06-12 04:23:34 +00:00
};
}