Match and link CBSGenerate

This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-28 14:26:17 +03:00
parent 07479bf310
commit ec41101509
No known key found for this signature in database
GPG Key ID: E224F951761145F8
3 changed files with 5 additions and 4 deletions

View File

@ -204,7 +204,7 @@ LIBS = [
["MetroidPrime/BodyState/CBSSlide", False],
"MetroidPrime/BodyState/CBSHurled",
"MetroidPrime/BodyState/CBSJump",
["MetroidPrime/BodyState/CBSGenerate", False],
["MetroidPrime/BodyState/CBSGenerate", True],
"MetroidPrime/Enemies/CPuddleSpore",
"MetroidPrime/BodyState/CBSTaunt",
"MetroidPrime/CSortedLists",

View File

@ -169,7 +169,7 @@ METROIDPRIME :=\
$(BUILD_DIR)/asm/MetroidPrime/BodyState/CBSSlide.o\
$(BUILD_DIR)/asm/MetroidPrime/BodyState/CBSHurled.o\
$(BUILD_DIR)/asm/MetroidPrime/BodyState/CBSJump.o\
$(BUILD_DIR)/asm/MetroidPrime/BodyState/CBSGenerate.o\
$(BUILD_DIR)/src/MetroidPrime/BodyState/CBSGenerate.o\
$(BUILD_DIR)/asm/MetroidPrime/Enemies/CPuddleSpore.o\
$(BUILD_DIR)/asm/MetroidPrime/BodyState/CBSTaunt.o\
$(BUILD_DIR)/asm/MetroidPrime/CSortedLists.o\

View File

@ -40,8 +40,9 @@ pas::EAnimationState CBSGenerate::UpdateBody(float dt, CBodyController& bc,
CStateManager& mgr) override {
const pas::EAnimationState st = GetBodyStateTransition(dt, bc);
if (st == pas::kAS_Invalid) {
if (bc.GetCommandMgr().GetTargetVector().IsNonZero()) {
bc.FaceDirection(bc.GetCommandMgr().GetTargetVector(), dt);
CBodyStateCmdMgr& commandMgr = bc.CommandMgr();
if (commandMgr.GetTargetVector().IsNonZero()) {
bc.FaceDirection(commandMgr.GetTargetVector(), dt);
}
}
return st;