2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CWEAPON
|
|
|
|
#define _CWEAPON
|
2022-10-04 00:00:46 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "MetroidPrime/CActor.hpp"
|
|
|
|
#include "MetroidPrime/CDamageInfo.hpp"
|
|
|
|
#include "MetroidPrime/Weapons/WeaponTypes.hpp"
|
|
|
|
|
|
|
|
class CWeapon : public CActor {
|
|
|
|
public:
|
2022-10-27 05:57:38 +00:00
|
|
|
CWeapon(TUniqueId uid, TAreaId areaId, bool active, TUniqueId owner, EWeaponType type,
|
|
|
|
const rstl::string& name, CTransform4f& xf, const CMaterialFilter& filter,
|
|
|
|
const CMaterialList& mList, const CDamageInfo& dInfo, EProjectileAttrib attribs,
|
|
|
|
const CModelData& mData);
|
2022-10-04 00:00:46 +00:00
|
|
|
|
|
|
|
// CEntity
|
|
|
|
~CWeapon() override;
|
2022-10-09 05:37:23 +00:00
|
|
|
void Think(float dt, CStateManager& mgr) override;
|
2022-10-04 00:00:46 +00:00
|
|
|
|
|
|
|
// CActor
|
|
|
|
void Render(const CStateManager&) const override;
|
|
|
|
EWeaponCollisionResponseTypes GetCollisionResponseType(const CVector3f&, const CVector3f&,
|
|
|
|
const CWeaponMode&,
|
|
|
|
int /*EProjectileAttrib?*/) const override;
|
|
|
|
void FluidFXThink(EFluidState, CScriptWater&, CStateManager&) override;
|
|
|
|
|
2022-10-20 16:32:57 +00:00
|
|
|
EProjectileAttrib GetAttribField() const { return xe8_projectileAttribs; }
|
2022-10-27 05:57:38 +00:00
|
|
|
void SetDamageFalloffSpeed(float d);
|
2022-10-04 00:00:46 +00:00
|
|
|
private:
|
|
|
|
EProjectileAttrib xe8_projectileAttribs;
|
|
|
|
TUniqueId xec_ownerId;
|
|
|
|
EWeaponType xf0_weaponType;
|
|
|
|
CMaterialFilter xf8_filter;
|
|
|
|
CDamageInfo x110_origDamageInfo;
|
|
|
|
CDamageInfo x12c_curDamageInfo;
|
|
|
|
float x148_curTime;
|
|
|
|
float x14c_damageFalloffSpeed;
|
|
|
|
float x150_damageDuration;
|
|
|
|
float x154_interferenceDuration;
|
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CWeapon, 0x158)
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CWEAPON
|