2016-12-22 19:57:21 +00:00
|
|
|
#ifndef __URDE_CWEAPON_HPP__
|
|
|
|
#define __URDE_CWEAPON_HPP__
|
|
|
|
|
|
|
|
#include "World/CActor.hpp"
|
|
|
|
#include "Weapon/WeaponCommon.hpp"
|
2017-05-18 10:58:15 +00:00
|
|
|
#include "World/CDamageInfo.hpp"
|
2016-12-22 19:57:21 +00:00
|
|
|
#include "Collision/CMaterialFilter.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CWeapon : public CActor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum class EProjectileAttrib
|
|
|
|
{
|
|
|
|
None = 0,
|
2017-09-05 03:00:19 +00:00
|
|
|
PartialCharge = (1 << 0),
|
|
|
|
PlasmaProjectile = (1 << 1),
|
|
|
|
Charged = (1 << 2),
|
2016-12-22 19:57:21 +00:00
|
|
|
Ice = (1 << 3),
|
|
|
|
Wave = (1 << 4),
|
|
|
|
Plasma = (1 << 5),
|
2017-01-15 03:59:37 +00:00
|
|
|
Phazon = (1 << 6),
|
|
|
|
Unknown1 = (1 << 7),
|
|
|
|
Bombs = (1 << 8),
|
|
|
|
PowerBombs = (1 << 9),
|
2017-09-05 03:00:19 +00:00
|
|
|
ArmCannon = (1 << 11),
|
2017-08-26 04:36:25 +00:00
|
|
|
BigStrike = (1 << 12),
|
2017-06-12 04:23:34 +00:00
|
|
|
StaticInterference = (1 << 14),
|
2017-11-24 08:23:28 +00:00
|
|
|
KeepInCinematic = (1 << 17),
|
2016-12-22 19:57:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
2017-01-15 03:59:37 +00:00
|
|
|
EProjectileAttrib xe8_projectileAttribs;
|
2017-11-24 08:23:28 +00:00
|
|
|
TUniqueId xec_ownerId;
|
2017-05-18 10:58:15 +00:00
|
|
|
EWeaponType xf0_weaponType;
|
|
|
|
u32 xf4_;
|
|
|
|
CMaterialFilter xf8_;
|
|
|
|
u32 x10c_;
|
|
|
|
CDamageInfo x110_;
|
|
|
|
CDamageInfo x12c_;
|
|
|
|
float x148_;
|
|
|
|
float x14c_;
|
2017-08-25 06:18:09 +00:00
|
|
|
float x150_damageDuration;
|
2017-06-12 04:23:34 +00:00
|
|
|
float x154_interferenceDuration;
|
2016-12-22 19:57:21 +00:00
|
|
|
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);
|
2016-12-22 19:57:21 +00:00
|
|
|
|
2017-01-15 03:59:37 +00:00
|
|
|
virtual void Accept(IVisitor &visitor);
|
2016-12-22 19:57:21 +00:00
|
|
|
bool HasAttrib(EProjectileAttrib) const;
|
2017-01-15 03:59:37 +00:00
|
|
|
EProjectileAttrib GetAttribField() const { return xe8_projectileAttribs; }
|
2016-12-22 19:57:21 +00:00
|
|
|
const CMaterialFilter& GetFilter() const;
|
|
|
|
void SetFilter(const CMaterialFilter&);
|
2017-11-24 08:23:28 +00:00
|
|
|
TUniqueId GetOwnerId() const { return xec_ownerId; }
|
|
|
|
void SetOwnerId(TUniqueId oid) { xec_ownerId = oid; }
|
2016-12-22 19:57:21 +00:00
|
|
|
EWeaponType GetType() const;
|
|
|
|
const CDamageInfo& GetDamageInfo() const;
|
|
|
|
CDamageInfo& DamageInfo();
|
|
|
|
void SetDamageInfo(const CDamageInfo&);
|
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; }
|
2016-12-22 19:57:21 +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&,
|
|
|
|
const CWeaponMode&, int) const
|
2016-12-22 19:57:21 +00:00
|
|
|
{
|
|
|
|
return EWeaponCollisionResponseTypes::Default;
|
|
|
|
}
|
|
|
|
void FluidFXThink(EFluidState, CScriptWater&, CStateManager&) {}
|
|
|
|
};
|
|
|
|
ENABLE_BITWISE_ENUM(CWeapon::EProjectileAttrib)
|
|
|
|
}
|
|
|
|
#endif // __URDE_CWEAPON_HPP__
|