mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-17 04:17:01 +00:00
Add CBeamProjectile
This commit is contained in:
@@ -19,8 +19,17 @@ public:
|
||||
const CTransform4f& xf, int maxLength, float beamRadius, float travelSpeed,
|
||||
EMaterialTypes matType, const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||
EProjectileAttrib attribs, bool growingBeam);
|
||||
~CBeamProjectile() override;
|
||||
|
||||
// CEntity
|
||||
~CBeamProjectile() override;
|
||||
void Accept(IVisitor& visitor) override;
|
||||
|
||||
// CActor
|
||||
rstl::optional_object<CAABox> GetTouchBounds() const override;
|
||||
void Touch(CActor&, CStateManager&) override;
|
||||
void CalculateRenderBounds() override;
|
||||
|
||||
// CBeamProjectile
|
||||
virtual void UpdateFx(const CTransform4f&, float, CStateManager&);
|
||||
virtual void ResetBeam(CStateManager&, bool);
|
||||
virtual void Fire(const CTransform4f&, CStateManager&, bool) = 0;
|
||||
@@ -51,6 +60,8 @@ private:
|
||||
rstl::reserved_vector< CVector3f, 8 > x400_pointCache;
|
||||
bool x464_24_growingBeam : 1;
|
||||
bool x464_25_enableTouchDamage : 1;
|
||||
|
||||
void SetCollisionResultData(EDamageType dType, CRayCastResult& res, TUniqueId id);
|
||||
};
|
||||
CHECK_SIZEOF(CBeamProjectile, 0x468)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "MetroidPrime/CStateManager.hpp"
|
||||
#include "MetroidPrime/Weapons/CProjectileWeapon.hpp"
|
||||
#include "MetroidPrime/Weapons/CWeapon.hpp"
|
||||
|
||||
@@ -16,7 +17,13 @@ class CProjectileTouchResult;
|
||||
|
||||
class CGameProjectile : public CWeapon {
|
||||
public:
|
||||
// TODO ctor
|
||||
CGameProjectile(bool active, const TToken< CWeaponDescription >&, const rstl::string& name,
|
||||
EWeaponType wType, const CTransform4f& xf, EMaterialTypes excludeMat,
|
||||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||
TUniqueId homingTarget, uint attribs, bool underwater,
|
||||
const CVector3f& scale,
|
||||
const rstl::optional_object< TLockedToken< CGenDescription > >& visorParticle,
|
||||
ushort visorSfx, bool sendCollideMsg);
|
||||
|
||||
// CEntity
|
||||
~CGameProjectile() override;
|
||||
@@ -41,6 +48,10 @@ public:
|
||||
bool GetWeaponActive() const { return x2e4_24_active; }
|
||||
void DeleteProjectileLight(CStateManager&);
|
||||
|
||||
void ApplyDamageToActors(CStateManager& mgr, const CDamageInfo& dInfo);
|
||||
CRayCastResult RayCollisionCheckWithWorld(TUniqueId& idOut, const CVector3f& start, const CVector3f& end,
|
||||
float mag, const TEntityList& nearList, CStateManager& mgr);
|
||||
|
||||
protected:
|
||||
rstl::optional_object< TLockedToken< CGenDescription > > x158_visorParticle;
|
||||
ushort x168_visorSfx;
|
||||
|
||||
@@ -30,6 +30,7 @@ public:
|
||||
EProjectileAttrib GetAttribField() const { return xe8_projectileAttribs; }
|
||||
TUniqueId GetOwnerId() const { return xec_ownerId; }
|
||||
EWeaponType GetWeaponType() const { return xf0_weaponType; }
|
||||
CMaterialFilter GetFilter() const { return xf8_filter; }
|
||||
CDamageInfo& OrigDamageInfo() { return x110_origDamageInfo; }
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user