metaforce/Runtime/Weapon/CWeapon.hpp

54 lines
2.2 KiB
C++
Raw Normal View History

#ifndef __URDE_CWEAPON_HPP__
#define __URDE_CWEAPON_HPP__
#include "World/CActor.hpp"
#include "Weapon/WeaponCommon.hpp"
#include "World/CDamageInfo.hpp"
#include "Collision/CMaterialFilter.hpp"
namespace urde
{
class CWeapon : public CActor
{
2018-02-09 07:12:26 +00:00
protected:
2017-01-15 03:59:37 +00:00
EProjectileAttrib xe8_projectileAttribs;
2017-11-24 08:23:28 +00:00
TUniqueId xec_ownerId;
EWeaponType xf0_weaponType;
u32 xf4_;
2018-02-01 23:19:34 +00:00
CMaterialFilter xf8_filter;
u32 x10c_;
2018-02-01 23:19:34 +00:00
CDamageInfo x110_origDamageInfo;
CDamageInfo x12c_curDamageInfo;
float x148_curTime;
float x14c_damageFalloffSpeed;
2017-08-25 06:18:09 +00:00
float x150_damageDuration;
2017-06-12 04:23:34 +00:00
float x154_interferenceDuration;
public:
2017-09-05 03:00:19 +00:00
CWeapon(TUniqueId uid, TAreaId aid, bool active, TUniqueId owner, EWeaponType type,
2017-11-13 06:19:18 +00:00
std::string_view name, const zeus::CTransform& xf, const CMaterialFilter& filter,
2017-09-05 03:00:19 +00:00
const CMaterialList& mList, const CDamageInfo&, EProjectileAttrib attribs, CModelData&& mData);
2017-01-15 03:59:37 +00:00
virtual void Accept(IVisitor &visitor);
2018-02-01 23:19:34 +00:00
bool HasAttrib(EProjectileAttrib attrib) const
{ return (int(xe8_projectileAttribs) & int(attrib)) == int(attrib); }
2017-01-15 03:59:37 +00:00
EProjectileAttrib GetAttribField() const { return xe8_projectileAttribs; }
2018-02-01 23:19:34 +00:00
const CMaterialFilter& GetFilter() const { return xf8_filter; }
void SetFilter(const CMaterialFilter& filter) { xf8_filter = filter; }
2017-11-24 08:23:28 +00:00
TUniqueId GetOwnerId() const { return xec_ownerId; }
void SetOwnerId(TUniqueId oid) { xec_ownerId = oid; }
2018-02-01 23:19:34 +00:00
EWeaponType GetType() const { return xf0_weaponType; }
const CDamageInfo& GetDamageInfo() const { return x12c_curDamageInfo; }
CDamageInfo& DamageInfo() { return x12c_curDamageInfo; }
void SetDamageInfo(const CDamageInfo& dInfo) { x12c_curDamageInfo = dInfo; }
2017-08-25 06:18:09 +00:00
float GetDamageDuration() const { return x150_damageDuration; }
2017-06-12 04:23:34 +00:00
float GetInterferenceDuration() const { return x154_interferenceDuration; }
2018-02-01 23:19:34 +00:00
void Think(float, CStateManager &);
void Render(const CStateManager&) const;
2017-08-13 05:26:14 +00:00
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
2018-02-12 05:30:21 +00:00
const CWeaponMode&, EProjectileAttrib) const;
2018-02-01 23:19:34 +00:00
void FluidFXThink(EFluidState state, CScriptWater& water, CStateManager& mgr);
};
}
#endif // __URDE_CWEAPON_HPP__