metaforce/Runtime/MP1/World/CRipper.hpp

48 lines
2.0 KiB
C++
Raw Normal View History

2019-08-11 03:02:54 +00:00
#pragma once
#include "World/CPatterned.hpp"
#include "World/CGrappleParameters.hpp"
2019-08-11 15:14:52 +00:00
#include "World/CScriptPlatform.hpp"
2019-08-11 03:02:54 +00:00
namespace urde::MP1 {
2019-08-11 15:14:52 +00:00
2019-08-11 03:02:54 +00:00
class CRipper : public CPatterned {
2019-08-11 15:14:52 +00:00
CGrappleParameters x568_grappleParams;
TUniqueId x598_grapplePoint = kInvalidUniqueId;
TUniqueId x59a_platformId = kInvalidUniqueId;
bool x59c_24_muted : 1;
void ProcessGrapplePoint(CStateManager&);
void AddGrapplePoint(CStateManager&);
void RemoveGrapplePoint(CStateManager&);
void AddPlatform(CStateManager&);
void RemovePlatform(CStateManager&);
2019-08-11 03:02:54 +00:00
public:
DEFINE_PATTERNED(Ripper)
CRipper(TUniqueId uid, std::string_view name, EFlavorType type, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms,
const CGrappleParameters& grappleParms);
2019-08-11 15:14:52 +00:00
void Think(float dt, CStateManager& mgr) override;
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) override;
EWeaponCollisionResponseTypes GetCollisionResponseType(const zeus::CVector3f&, const zeus::CVector3f&,
const CWeaponMode& wp, EProjectileAttrib) const override {
if (!GetDamageVulnerability()->WeaponHits(wp, false))
return EWeaponCollisionResponseTypes::Unknown82;
return EWeaponCollisionResponseTypes::Unknown32;
}
void KnockBack(const zeus::CVector3f&, CStateManager&, const CDamageInfo&, EKnockBackType, bool, float) override;
void Patrol(CStateManager&, EStateMsg, float) override;
bool PathOver(CStateManager&, float) override { return false; } /* They never give you up, or let you down */
};
class CRipperControlledPlatform : public CScriptPlatform {
TUniqueId x358_owner;
float x35c_yaw;
public:
CRipperControlledPlatform(TUniqueId, TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&,
const zeus::CAABox&, bool, const std::optional<TLockedToken<CCollidableOBBTreeGroup>>&);
2019-08-11 03:02:54 +00:00
};
}