2017-06-12 04:23:34 +00:00
|
|
|
#ifndef __URDE_CENERGYPROJECTILE_HPP__
|
|
|
|
#define __URDE_CENERGYPROJECTILE_HPP__
|
|
|
|
|
|
|
|
#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,
|
|
|
|
const zeus::CTransform& xf, EMaterialTypes materials, 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,
|
2018-02-11 05:27:00 +00:00
|
|
|
const rstl::optional_object<TLockedToken<CGenDescription>>& visorParticle,
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CENERGYPROJECTILE_HPP__
|