2019-08-11 03:02:54 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include "Runtime/World/CGrappleParameters.hpp"
|
|
|
|
#include "Runtime/World/CPatterned.hpp"
|
|
|
|
#include "Runtime/World/CScriptPlatform.hpp"
|
2019-08-11 03:02:54 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce::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;
|
2020-04-21 07:22:41 +00:00
|
|
|
bool x59c_24_muted : 1 = false;
|
2019-08-11 15:14:52 +00:00
|
|
|
|
|
|
|
void ProcessGrapplePoint(CStateManager&);
|
|
|
|
void AddGrapplePoint(CStateManager&);
|
|
|
|
void RemoveGrapplePoint(CStateManager&);
|
|
|
|
void AddPlatform(CStateManager&);
|
|
|
|
void RemovePlatform(CStateManager&);
|
2020-08-23 18:08:25 +00:00
|
|
|
|
2019-08-11 03:02:54 +00:00
|
|
|
public:
|
2020-08-23 19:03:33 +00:00
|
|
|
DEFINE_PATTERNED(Ripper);
|
2019-08-11 03:02:54 +00:00
|
|
|
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;
|
2020-08-23 18:08:25 +00:00
|
|
|
|
2019-08-11 15:14:52 +00:00
|
|
|
public:
|
2021-05-26 14:00:57 +00:00
|
|
|
DEFINE_ENTITY
|
2019-08-11 15:14:52 +00:00
|
|
|
CRipperControlledPlatform(TUniqueId, TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&,
|
|
|
|
const zeus::CAABox&, bool, const std::optional<TLockedToken<CCollidableOBBTreeGroup>>&);
|
2020-08-23 18:54:21 +00:00
|
|
|
|
2021-06-07 19:29:18 +00:00
|
|
|
zeus::CQuaternion Move(float, CStateManager&) override;
|
2019-08-11 03:02:54 +00:00
|
|
|
};
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce::MP1
|