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,
|
2022-11-09 23:45:24 +00:00
|
|
|
const rstl::string& name, const CTransform4f& xf, const CMaterialFilter& filter,
|
2022-10-27 05:57:38 +00:00
|
|
|
const CMaterialList& mList, const CDamageInfo& dInfo, EProjectileAttrib attribs,
|
|
|
|
const CModelData& mData);
|
2022-10-04 00:00:46 +00:00
|
|
|
|
|
|
|
// CEntity
|
2023-02-06 07:21:28 +00:00
|
|
|
~CWeapon();
|
|
|
|
void Think(float dt, CStateManager& mgr);
|
2022-10-04 00:00:46 +00:00
|
|
|
|
|
|
|
// CActor
|
2023-02-06 07:21:28 +00:00
|
|
|
void Render(const CStateManager&) const;
|
2022-10-04 00:00:46 +00:00
|
|
|
EWeaponCollisionResponseTypes GetCollisionResponseType(const CVector3f&, const CVector3f&,
|
|
|
|
const CWeaponMode&,
|
2023-02-06 07:21:28 +00:00
|
|
|
int /*EProjectileAttrib?*/) const;
|
|
|
|
void FluidFXThink(EFluidState, CScriptWater&, CStateManager&);
|
2022-10-04 00:00:46 +00:00
|
|
|
|
2022-10-27 05:57:38 +00:00
|
|
|
void SetDamageFalloffSpeed(float d);
|
2022-10-29 04:22:07 +00:00
|
|
|
|
|
|
|
EProjectileAttrib GetAttribField() const { return xe8_projectileAttribs; }
|
|
|
|
TUniqueId GetOwnerId() const { return xec_ownerId; }
|
2022-11-09 23:45:24 +00:00
|
|
|
EWeaponType GetWeaponType() const { return xf0_weaponType; }
|
2022-11-24 16:29:09 +00:00
|
|
|
CMaterialFilter GetFilter() const { return xf8_filter; }
|
2022-11-09 23:45:24 +00:00
|
|
|
CDamageInfo& OrigDamageInfo() { return x110_origDamageInfo; }
|
2022-10-29 04:22:07 +00:00
|
|
|
|
2022-11-09 23:45:24 +00:00
|
|
|
protected:
|
2022-10-04 00:00:46 +00:00
|
|
|
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
|