Match and link CScriptPlayerStateChange.

Thanks Antidote
This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-16 18:16:28 +03:00
parent e2c87919cb
commit 0a7aa39f41
No known key found for this signature in database
GPG Key ID: E224F951761145F8
4 changed files with 5 additions and 3 deletions

View File

@ -292,7 +292,7 @@ LIBS = [
["MetroidPrime/BodyState/CABSIdle", True],
"MetroidPrime/BodyState/CABSFlinch",
"MetroidPrime/BodyState/CABSAim",
"MetroidPrime/ScriptObjects/CScriptPlayerStateChange",
["MetroidPrime/ScriptObjects/CScriptPlayerStateChange", True],
"MetroidPrime/Enemies/CThardus",
"MetroidPrime/CActorParticles",
"MetroidPrime/Enemies/CWallCrawlerSwarm",

View File

@ -21,6 +21,8 @@ public:
void Accept(IVisitor& visit) override;
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
~CScriptPlayerStateChange();
bool Filtered() { return x44_ctrlCmdOpt == kCCO_Filtered; }
};
#endif // _CSCRIPTPLAYERSTATECHANGE

View File

@ -259,7 +259,7 @@ METROIDPRIME :=\
$(BUILD_DIR)/src/MetroidPrime/BodyState/CABSIdle.o\
$(BUILD_DIR)/asm/MetroidPrime/BodyState/CABSFlinch.o\
$(BUILD_DIR)/asm/MetroidPrime/BodyState/CABSAim.o\
$(BUILD_DIR)/asm/MetroidPrime/ScriptObjects/CScriptPlayerStateChange.o\
$(BUILD_DIR)/src/MetroidPrime/ScriptObjects/CScriptPlayerStateChange.o\
$(BUILD_DIR)/asm/MetroidPrime/Enemies/CThardus.o\
$(BUILD_DIR)/asm/MetroidPrime/CActorParticles.o\
$(BUILD_DIR)/asm/MetroidPrime/Enemies/CWallCrawlerSwarm.o\

View File

@ -28,7 +28,7 @@ void CScriptPlayerStateChange::AcceptScriptMsg(EScriptObjectMessage msg, TUnique
if (x44_ctrlCmdOpt != kCCO_Unfiltered) {
switch (x40_ctrl) {
case kC_Filtered:
bool filtered = !(1 - x44_ctrlCmdOpt);
bool filtered = Filtered();
ControlMapper::SetCommandFiltered(ControlMapper::kC_OrbitClose, filtered);
ControlMapper::SetCommandFiltered(ControlMapper::kC_OrbitConfirm, filtered);
ControlMapper::SetCommandFiltered(ControlMapper::kC_OrbitDown, filtered);