2022-10-14 08:46:50 +00:00
|
|
|
#ifndef _CBODYSTATECMDMGR
|
|
|
|
#define _CBODYSTATECMDMGR
|
|
|
|
|
2022-10-28 21:42:35 +00:00
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "MetroidPrime/TGameTypes.hpp"
|
|
|
|
|
2022-10-24 23:29:11 +00:00
|
|
|
#include "Kyoto/Animation/CharacterCommon.hpp"
|
2022-11-11 12:55:40 +00:00
|
|
|
#include "Kyoto/Math/CUnitVector3f.hpp"
|
2022-11-11 14:51:34 +00:00
|
|
|
#include "Kyoto/Math/CVector3f.hpp"
|
|
|
|
|
2023-02-05 19:12:46 +00:00
|
|
|
#include "rstl/reserved_vector.hpp"
|
2022-10-14 08:46:50 +00:00
|
|
|
|
2022-10-28 21:42:35 +00:00
|
|
|
enum ESteeringBlendMode {
|
|
|
|
kSBM_Normal,
|
|
|
|
kSBM_FullSpeed,
|
|
|
|
kSBM_Clamped,
|
|
|
|
};
|
2022-10-14 13:36:01 +00:00
|
|
|
|
2022-10-28 21:42:35 +00:00
|
|
|
class CBodyStateCmd {
|
2022-10-14 13:36:01 +00:00
|
|
|
public:
|
2022-10-28 21:42:35 +00:00
|
|
|
CBodyStateCmd(EBodyStateCmd cmd) : x4_cmd(cmd) {}
|
2022-10-24 23:29:11 +00:00
|
|
|
virtual ~CBodyStateCmd(){};
|
2022-10-28 21:42:35 +00:00
|
|
|
|
2022-10-14 13:36:01 +00:00
|
|
|
EBodyStateCmd GetCommandId() const { return x4_cmd; }
|
2022-10-28 21:42:35 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
EBodyStateCmd x4_cmd;
|
2022-10-14 13:36:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CBCAdditiveFlinchCmd : public CBodyStateCmd {
|
|
|
|
public:
|
2023-10-12 21:52:29 +00:00
|
|
|
CBCAdditiveFlinchCmd(float weight) : CBodyStateCmd(kBSC_AdditiveFlinch), x8_weight(weight) {}
|
2022-10-28 21:42:35 +00:00
|
|
|
|
2022-10-14 13:36:01 +00:00
|
|
|
float GetWeight() const { return x8_weight; }
|
2022-10-28 21:42:35 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
float x8_weight;
|
2022-10-14 13:36:01 +00:00
|
|
|
};
|
2022-10-14 08:46:50 +00:00
|
|
|
|
2022-10-25 19:35:44 +00:00
|
|
|
class CBCGenerateCmd : public CBodyStateCmd {
|
|
|
|
public:
|
2022-10-28 21:42:35 +00:00
|
|
|
CBCGenerateCmd(pas::EGenerateType type, int animId)
|
2022-10-25 19:35:44 +00:00
|
|
|
: CBodyStateCmd(kBSC_Generate)
|
|
|
|
, x8_type(type)
|
|
|
|
, xc_targetPos(0.f, 0.f, 0.f)
|
|
|
|
, x18_animId(animId)
|
|
|
|
, x1c_25_overrideAnim(animId != -1) {}
|
|
|
|
|
2022-10-28 21:42:35 +00:00
|
|
|
CBCGenerateCmd(pas::EGenerateType type, const CVector3f& vec, bool targetTransform = false,
|
|
|
|
bool overrideAnim = false)
|
2022-10-25 19:35:44 +00:00
|
|
|
: CBodyStateCmd(kBSC_Generate)
|
|
|
|
, x8_type(type)
|
|
|
|
, xc_targetPos(vec)
|
2022-10-29 04:22:07 +00:00
|
|
|
, x18_animId(-1)
|
2022-10-25 19:35:44 +00:00
|
|
|
, x1c_24_targetTransform(targetTransform)
|
|
|
|
, x1c_25_overrideAnim(overrideAnim) {}
|
2022-10-28 11:25:08 +00:00
|
|
|
|
2022-10-25 19:35:44 +00:00
|
|
|
pas::EGenerateType GetGenerateType() const { return x8_type; }
|
|
|
|
const CVector3f& GetExitTargetPos() const { return xc_targetPos; }
|
|
|
|
int GetSpecialAnimId() const { return x18_animId; }
|
2022-10-29 04:22:07 +00:00
|
|
|
bool HasExitTargetPos() const { return x1c_24_targetTransform; }
|
2022-10-25 19:35:44 +00:00
|
|
|
bool UseSpecialAnimId() const { return x1c_25_overrideAnim; }
|
2022-10-28 21:42:35 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
pas::EGenerateType x8_type;
|
|
|
|
CVector3f xc_targetPos;
|
|
|
|
int x18_animId;
|
2022-10-29 04:22:07 +00:00
|
|
|
uint x1c_24_targetTransform : 1;
|
|
|
|
uint x1c_25_overrideAnim : 1;
|
2022-10-25 19:35:44 +00:00
|
|
|
};
|
|
|
|
|
2022-10-28 09:17:39 +00:00
|
|
|
//
|
|
|
|
|
2022-10-28 11:25:08 +00:00
|
|
|
class CBCScriptedCmd : public CBodyStateCmd {
|
|
|
|
public:
|
2023-10-12 21:52:29 +00:00
|
|
|
CBCScriptedCmd(int animId, bool isLooped, bool useLoopDuration, float loopDuration)
|
2022-10-28 11:25:08 +00:00
|
|
|
: CBodyStateCmd(kBSC_Scripted)
|
2023-10-12 21:52:29 +00:00
|
|
|
, x8_animId(animId)
|
|
|
|
, xc_24_isLooped(isLooped)
|
|
|
|
, xc_25_useLoopDuration(useLoopDuration)
|
|
|
|
, x10_loopDuration(loopDuration) {}
|
2022-10-28 11:25:08 +00:00
|
|
|
|
2023-10-12 21:52:29 +00:00
|
|
|
int GetAnimId() const { return x8_animId; }
|
|
|
|
bool IsLooped() const { return xc_24_isLooped; }
|
|
|
|
bool GetUseLoopDuration() const { return xc_25_useLoopDuration; }
|
|
|
|
float GetLoopDuration() const { return x10_loopDuration; }
|
2022-10-28 21:42:35 +00:00
|
|
|
|
|
|
|
private:
|
2023-10-12 21:52:29 +00:00
|
|
|
int x8_animId;
|
|
|
|
bool xc_24_isLooped : 1;
|
|
|
|
bool xc_25_useLoopDuration : 1;
|
|
|
|
float x10_loopDuration;
|
2022-10-28 11:25:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-28 11:41:31 +00:00
|
|
|
class CBCStepCmd : public CBodyStateCmd {
|
|
|
|
public:
|
2022-10-28 21:42:35 +00:00
|
|
|
CBCStepCmd(pas::EStepDirection dir, pas::EStepType type)
|
2022-10-28 11:41:31 +00:00
|
|
|
: CBodyStateCmd(kBSC_Step), x8_dir(dir), xc_type(type) {}
|
|
|
|
|
|
|
|
pas::EStepDirection GetStepDirection() const { return x8_dir; }
|
|
|
|
pas::EStepType GetStepType() const { return xc_type; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
pas::EStepDirection x8_dir;
|
|
|
|
pas::EStepType xc_type;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-28 11:34:03 +00:00
|
|
|
class CBCTauntCmd : public CBodyStateCmd {
|
|
|
|
public:
|
2022-10-28 21:42:35 +00:00
|
|
|
CBCTauntCmd(pas::ETauntType type) : CBodyStateCmd(kBSC_Taunt), x8_type(type) {}
|
|
|
|
|
2022-10-28 11:34:03 +00:00
|
|
|
pas::ETauntType GetTauntType() const { return x8_type; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
pas::ETauntType x8_type;
|
|
|
|
};
|
2022-10-28 09:17:39 +00:00
|
|
|
|
2022-10-28 11:34:03 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
class CBCGetupCmd : public CBodyStateCmd {
|
2022-10-28 09:17:39 +00:00
|
|
|
public:
|
2022-10-28 21:42:35 +00:00
|
|
|
CBCGetupCmd(pas::EGetupType type) : CBodyStateCmd(kBSC_Getup), x8_type(type) {}
|
|
|
|
|
2022-10-28 09:17:39 +00:00
|
|
|
pas::EGetupType GetGetupType() const { return x8_type; }
|
2022-10-28 11:34:03 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
pas::EGetupType x8_type;
|
2022-10-28 09:17:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-28 12:33:10 +00:00
|
|
|
class CBCAdditiveReactionCmd : public CBodyStateCmd {
|
|
|
|
public:
|
2022-10-28 21:42:35 +00:00
|
|
|
CBCAdditiveReactionCmd(pas::EAdditiveReactionType type, float weight, bool active)
|
2022-10-28 12:33:10 +00:00
|
|
|
: CBodyStateCmd(kBSC_AdditiveReaction), x8_weight(weight), xc_type(type), x10_active(active) {}
|
|
|
|
|
|
|
|
pas::EAdditiveReactionType GetType() const { return xc_type; }
|
|
|
|
float GetWeight() const { return x8_weight; }
|
|
|
|
bool GetIsActive() const { return x10_active; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
float x8_weight;
|
|
|
|
pas::EAdditiveReactionType xc_type;
|
|
|
|
bool x10_active;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-25 19:35:44 +00:00
|
|
|
class CBCSlideCmd : public CBodyStateCmd {
|
2022-10-24 23:29:11 +00:00
|
|
|
public:
|
2022-10-28 21:42:35 +00:00
|
|
|
CBCSlideCmd(pas::ESlideType type, const CVector3f& dir)
|
2022-10-24 23:29:11 +00:00
|
|
|
: CBodyStateCmd(kBSC_Slide), x8_type(type), xc_dir(dir) {}
|
|
|
|
|
2023-02-06 17:01:01 +00:00
|
|
|
~CBCSlideCmd() override {}
|
2022-11-11 14:51:34 +00:00
|
|
|
|
2022-10-24 23:29:11 +00:00
|
|
|
pas::ESlideType GetSlideType() const { return x8_type; }
|
|
|
|
const CVector3f& GetSlideDirection() const { return xc_dir; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
pas::ESlideType x8_type;
|
|
|
|
CVector3f xc_dir;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-28 13:16:03 +00:00
|
|
|
class CBCKnockDownCmd : public CBodyStateCmd {
|
|
|
|
public:
|
2022-10-28 21:42:35 +00:00
|
|
|
CBCKnockDownCmd(const CVector3f& vec, pas::ESeverity severity)
|
2022-10-28 13:16:03 +00:00
|
|
|
: CBodyStateCmd(kBSC_KnockDown), x8_dir(vec), x14_severity(severity) {}
|
|
|
|
|
|
|
|
const CVector3f& GetHitDirection() const { return x8_dir; }
|
|
|
|
pas::ESeverity GetHitSeverity() const { return x14_severity; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
CVector3f x8_dir;
|
|
|
|
pas::ESeverity x14_severity;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-28 13:37:30 +00:00
|
|
|
class CBCKnockBackCmd : public CBodyStateCmd {
|
|
|
|
public:
|
2022-10-28 21:42:35 +00:00
|
|
|
CBCKnockBackCmd(const CVector3f& vec, pas::ESeverity severity)
|
2022-10-28 13:37:30 +00:00
|
|
|
: CBodyStateCmd(kBSC_KnockBack), x8_dir(vec), x14_severity(severity) {}
|
|
|
|
|
|
|
|
const CVector3f& GetHitDirection() const { return x8_dir; }
|
|
|
|
pas::ESeverity GetHitSeverity() const { return x14_severity; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
CVector3f x8_dir;
|
|
|
|
pas::ESeverity x14_severity;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-28 21:42:35 +00:00
|
|
|
class CBCMeleeAttackCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
CBCMeleeAttackCmd(pas::ESeverity severity)
|
|
|
|
: CBodyStateCmd(kBSC_MeleeAttack)
|
|
|
|
, x8_severity(severity)
|
|
|
|
, xc_targetPos(0.f, 0.f, 0.f)
|
|
|
|
, x18_hasTargetPos(false) {}
|
|
|
|
|
|
|
|
CBCMeleeAttackCmd(pas::ESeverity severity, const CVector3f& target)
|
|
|
|
: CBodyStateCmd(kBSC_MeleeAttack)
|
|
|
|
, x8_severity(severity)
|
|
|
|
, xc_targetPos(target)
|
|
|
|
, x18_hasTargetPos(true) {}
|
|
|
|
|
|
|
|
pas::ESeverity GetAttackSeverity() const { return x8_severity; }
|
|
|
|
bool HasAttackTargetPos() const { return x18_hasTargetPos; }
|
|
|
|
const CVector3f& GetAttackTargetPos() const { return xc_targetPos; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
pas::ESeverity x8_severity;
|
|
|
|
CVector3f xc_targetPos;
|
|
|
|
bool x18_hasTargetPos;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
class CBCProjectileAttackCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
CBCProjectileAttackCmd(pas::ESeverity severity, const CVector3f& vec, bool b)
|
|
|
|
: CBodyStateCmd(kBSC_ProjectileAttack)
|
|
|
|
, x8_severity(severity)
|
|
|
|
, xc_target(vec)
|
|
|
|
, x18_blendAnims(b) {}
|
|
|
|
|
|
|
|
pas::ESeverity GetAttackSeverity() const { return x8_severity; }
|
|
|
|
const CVector3f& GetTargetPosition() const { return xc_target; }
|
|
|
|
bool BlendTwoClosest() const { return x18_blendAnims; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
pas::ESeverity x8_severity;
|
|
|
|
CVector3f xc_target;
|
|
|
|
bool x18_blendAnims;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
class CBCLoopAttackCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
CBCLoopAttackCmd(pas::ELoopAttackType type, bool waitForAnimOver = false)
|
|
|
|
: CBodyStateCmd(kBSC_LoopAttack), x8_type(type), xc_waitForAnimOver(waitForAnimOver) {}
|
|
|
|
|
|
|
|
pas::ELoopAttackType GetAttackType() const { return x8_type; }
|
2022-11-11 16:16:51 +00:00
|
|
|
int WaitForAnimOver() const { return xc_waitForAnimOver; }
|
2022-10-28 21:42:35 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
pas::ELoopAttackType x8_type;
|
2022-11-11 16:16:51 +00:00
|
|
|
int xc_waitForAnimOver;
|
2022-10-28 21:42:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
class CBCLoopReactionCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
CBCLoopReactionCmd(pas::EReactionType type) : CBodyStateCmd(kBSC_LoopReaction), x8_type(type) {}
|
|
|
|
|
|
|
|
pas::EReactionType GetReactionType() const { return x8_type; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
pas::EReactionType x8_type;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
class CBCLoopHitReactionCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
CBCLoopHitReactionCmd(pas::EReactionType type)
|
|
|
|
: CBodyStateCmd(kBSC_LoopHitReaction), x8_type(type) {}
|
|
|
|
|
|
|
|
pas::EReactionType GetReactionType() const { return x8_type; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
pas::EReactionType x8_type;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
class CBCHurledCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
CBCHurledCmd(const CVector3f& dir, const CVector3f& launchVel, bool startInLoop = false)
|
|
|
|
: CBodyStateCmd(kBSC_Hurled)
|
|
|
|
, x8_direction(dir)
|
|
|
|
, x14_launchVel(launchVel)
|
|
|
|
, x20_startInKnockLoop(startInLoop) {}
|
|
|
|
|
|
|
|
const CVector3f& GetHitDirection() const { return x8_direction; }
|
|
|
|
const CVector3f& GetLaunchVelocity() const { return x14_launchVel; }
|
|
|
|
bool GetSkipLaunchState() const { return x20_startInKnockLoop; }
|
|
|
|
void SetSkipLaunchState(bool s) { x20_startInKnockLoop = s; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
CVector3f x8_direction;
|
|
|
|
CVector3f x14_launchVel;
|
|
|
|
bool x20_startInKnockLoop;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
class CBCJumpCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
CBCJumpCmd(const CVector3f& wp1, pas::EJumpType type, bool startInLoop = false)
|
|
|
|
: CBodyStateCmd(kBSC_Jump)
|
|
|
|
, x8_type(type)
|
|
|
|
, xc_waypoint1(wp1)
|
|
|
|
, x18_waypoint2(0.f, 0.f, 0.f)
|
|
|
|
, x24_24_wallJump(false)
|
|
|
|
, x24_25_startInJumpLoop(startInLoop) {}
|
|
|
|
|
|
|
|
CBCJumpCmd(const CVector3f& wp1, const CVector3f& wp2, pas::EJumpType type)
|
|
|
|
: CBodyStateCmd(kBSC_Jump)
|
|
|
|
, x8_type(type)
|
|
|
|
, xc_waypoint1(wp1)
|
|
|
|
, x18_waypoint2(wp2)
|
|
|
|
, x24_24_wallJump(true)
|
|
|
|
, x24_25_startInJumpLoop(false) {}
|
|
|
|
|
|
|
|
pas::EJumpType GetJumpType() const { return x8_type; }
|
|
|
|
const CVector3f& GetJumpTarget() const { return xc_waypoint1; }
|
|
|
|
const CVector3f& GetSecondJumpTarget() const { return x18_waypoint2; }
|
|
|
|
bool IsWallJump() const { return x24_24_wallJump; }
|
|
|
|
bool StartInJumpLoop() const { return x24_25_startInJumpLoop; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
pas::EJumpType x8_type;
|
|
|
|
CVector3f xc_waypoint1;
|
|
|
|
CVector3f x18_waypoint2;
|
|
|
|
bool x24_24_wallJump : 1;
|
|
|
|
bool x24_25_startInJumpLoop : 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
class CBCCoverCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
CBCCoverCmd(pas::ECoverDirection dir, const CVector3f& v1, const CVector3f& v2)
|
|
|
|
: CBodyStateCmd(kBSC_Cover), x8_dir(dir), xc_targetPos(v1), x18_alignDir(v2) {}
|
|
|
|
|
|
|
|
pas::ECoverDirection GetDirection() const { return x8_dir; }
|
|
|
|
const CVector3f& GetTarget() const { return xc_targetPos; }
|
2022-11-11 12:55:40 +00:00
|
|
|
CUnitVector3f GetAlignDirection() const { return x18_alignDir; }
|
2022-10-28 21:42:35 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
pas::ECoverDirection x8_dir;
|
|
|
|
CVector3f xc_targetPos;
|
2022-11-11 12:55:40 +00:00
|
|
|
CUnitVector3f x18_alignDir;
|
2022-10-28 21:42:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
class CBCWallHangCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
CBCWallHangCmd(TUniqueId uid) : CBodyStateCmd(kBSC_WallHang), x8_wpId(uid) {}
|
|
|
|
|
|
|
|
TUniqueId GetTarget() const { return x8_wpId; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
TUniqueId x8_wpId;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
class CBCAdditiveAimCmd : public CBodyStateCmd {
|
|
|
|
public:
|
|
|
|
CBCAdditiveAimCmd() : CBodyStateCmd(kBSC_AdditiveAim) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
class CBCLocomotionCmd {
|
|
|
|
public:
|
|
|
|
CBCLocomotionCmd(const CVector3f& move, const CVector3f& face, float weight)
|
|
|
|
: x0_move(move), xc_face(face), x18_weight(weight) {}
|
|
|
|
|
|
|
|
const CVector3f& GetMoveVector() const { return x0_move; }
|
|
|
|
const CVector3f& GetFaceVector() const { return xc_face; }
|
|
|
|
float GetWeight() const { return x18_weight; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
CVector3f x0_move;
|
|
|
|
CVector3f xc_face;
|
|
|
|
float x18_weight;
|
|
|
|
};
|
|
|
|
|
|
|
|
//
|
|
|
|
|
2022-10-14 08:46:50 +00:00
|
|
|
class CBodyStateCmdMgr {
|
|
|
|
public:
|
2023-02-05 19:12:46 +00:00
|
|
|
CBodyStateCmdMgr();
|
|
|
|
~CBodyStateCmdMgr();
|
2022-10-28 21:42:35 +00:00
|
|
|
void ClearLocomotionCmds();
|
|
|
|
void DeliverCmd(const CBCLocomotionCmd& cmd);
|
2022-10-29 04:22:07 +00:00
|
|
|
void DeliverCmd(EBodyStateCmd cmd);
|
2022-10-28 21:42:35 +00:00
|
|
|
|
2023-02-05 19:12:46 +00:00
|
|
|
void DeliverCmd(const CBodyStateCmd& cmd);
|
2022-11-10 23:23:57 +00:00
|
|
|
|
2022-10-29 04:22:07 +00:00
|
|
|
void DeliverCmd(const CBCGenerateCmd& cmd) {
|
2023-10-12 21:52:29 +00:00
|
|
|
DeliverCmd(cmd.GetCommandId());
|
2022-10-29 04:22:07 +00:00
|
|
|
x18c_generate = cmd;
|
|
|
|
}
|
|
|
|
void DeliverCmd(const CBCKnockDownCmd& cmd) {
|
2023-10-12 21:52:29 +00:00
|
|
|
DeliverCmd(cmd.GetCommandId());
|
2022-10-29 04:22:07 +00:00
|
|
|
xdc_knockDown = cmd;
|
|
|
|
}
|
2022-11-11 14:51:34 +00:00
|
|
|
void DeliverCmd(const CBCSlideCmd& cmd) {
|
|
|
|
DeliverCmd(cmd.GetCommandId());
|
|
|
|
x1f8_slide = cmd;
|
|
|
|
}
|
2023-10-12 21:52:29 +00:00
|
|
|
void DeliverCmd(const CBCScriptedCmd& cmd) {
|
|
|
|
DeliverCmd(cmd.GetCommandId());
|
|
|
|
x21c_scripted = cmd;
|
|
|
|
}
|
2023-02-05 19:12:46 +00:00
|
|
|
void DeliverCmd(const CBCAdditiveReactionCmd& cmd) {
|
|
|
|
DeliverCmd(cmd.GetCommandId());
|
|
|
|
x284_additiveReaction = cmd;
|
|
|
|
}
|
2022-10-29 04:22:07 +00:00
|
|
|
|
2023-02-05 19:12:46 +00:00
|
|
|
void DeliverTargetVector(const CVector3f& t) { x18_target = t; }
|
|
|
|
void BlendSteeringCmds();
|
|
|
|
void SetSteeringSpeedRange(float rmin, float rmax);
|
|
|
|
void Reset();
|
2022-10-29 04:22:07 +00:00
|
|
|
CBodyStateCmd* GetCmd(EBodyStateCmd cmd);
|
2023-02-05 19:12:46 +00:00
|
|
|
const CBodyStateCmd* GetCmd(EBodyStateCmd cmd) const;
|
2022-10-28 21:42:35 +00:00
|
|
|
const CVector3f& GetMoveVector() const { return x0_move; }
|
2022-11-11 16:16:51 +00:00
|
|
|
const CVector3f& GetFaceVector() const { return xc_face; }
|
2022-10-25 19:35:44 +00:00
|
|
|
const CVector3f& GetTargetVector() const { return x18_target; }
|
2022-11-10 18:50:42 +00:00
|
|
|
const CVector3f& GetAdditiveTargetVector() const { return x24_additiveTarget; }
|
2023-10-12 21:52:29 +00:00
|
|
|
|
2022-10-24 23:29:11 +00:00
|
|
|
private:
|
2022-10-25 19:35:44 +00:00
|
|
|
CVector3f x0_move;
|
|
|
|
CVector3f xc_face;
|
|
|
|
CVector3f x18_target;
|
|
|
|
CVector3f x24_additiveTarget;
|
2022-10-28 21:42:35 +00:00
|
|
|
ESteeringBlendMode x30_steeringMode;
|
|
|
|
float x34_steeringSpeedMin;
|
|
|
|
float x38_steeringSpeedMax;
|
|
|
|
float x3c_steeringSpeed;
|
|
|
|
rstl::reserved_vector< CBodyStateCmd*, 28 > x40_commandTable;
|
|
|
|
uint xb4_deliveredCmdMask;
|
|
|
|
CBCGetupCmd xb8_getup;
|
|
|
|
CBCStepCmd xc4_step;
|
|
|
|
CBodyStateCmd xd4_die;
|
|
|
|
CBCKnockDownCmd xdc_knockDown;
|
|
|
|
CBCKnockBackCmd xf4_knockBack;
|
|
|
|
CBCMeleeAttackCmd x10c_meleeAttack;
|
|
|
|
CBCProjectileAttackCmd x128_projectileAttack;
|
|
|
|
CBCLoopAttackCmd x144_loopAttack;
|
|
|
|
CBCLoopReactionCmd x154_loopReaction;
|
|
|
|
CBCLoopHitReactionCmd x160_loopHitReaction;
|
|
|
|
CBodyStateCmd x16c_exitState;
|
|
|
|
CBodyStateCmd x174_leanFromCover;
|
|
|
|
CBodyStateCmd x17c_nextState;
|
|
|
|
CBodyStateCmd x184_maintainVelocity;
|
|
|
|
CBCGenerateCmd x18c_generate;
|
|
|
|
CBCHurledCmd x1ac_hurled;
|
|
|
|
CBCJumpCmd x1d0_jump;
|
|
|
|
CBCSlideCmd x1f8_slide;
|
|
|
|
CBCTauntCmd x210_taunt;
|
|
|
|
CBCScriptedCmd x21c_scripted;
|
|
|
|
CBCCoverCmd x230_cover;
|
|
|
|
CBCWallHangCmd x254_wallHang;
|
|
|
|
CBodyStateCmd x260_locomotion;
|
|
|
|
CBodyStateCmd x268_additiveIdle;
|
|
|
|
CBCAdditiveAimCmd x270_additiveAim;
|
|
|
|
CBCAdditiveFlinchCmd x278_additiveFlinch;
|
|
|
|
CBCAdditiveReactionCmd x284_additiveReaction;
|
|
|
|
CBodyStateCmd x298_stopReaction;
|
2022-10-14 08:46:50 +00:00
|
|
|
};
|
2022-10-28 21:42:35 +00:00
|
|
|
CHECK_SIZEOF(CBodyStateCmdMgr, 0x2a0)
|
2022-10-14 08:46:50 +00:00
|
|
|
|
|
|
|
#endif // _CBODYSTATECMDMGR
|