Allow the player to be interrupted (#881)

This commit is contained in:
Aaron Kimbrell 2022-12-16 15:23:38 -06:00 committed by GitHub
parent cd78a3dec7
commit 32f8bda538
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,17 +181,11 @@ void SkillComponent::Reset() {
} }
void SkillComponent::Interrupt() { void SkillComponent::Interrupt() {
if (m_Parent->IsPlayer()) return; // TODO: need to check immunities on the destroyable component, but they aren't implemented
auto* combat = m_Parent->GetComponent<BaseCombatAIComponent>(); auto* combat = m_Parent->GetComponent<BaseCombatAIComponent>();
if (combat != nullptr && combat->GetStunImmune()) return;
if (combat != nullptr && combat->GetStunImmune()) { for (const auto& behavior : this->m_managedBehaviors) behavior.second->Interrupt();
return;
}
for (const auto& behavior : this->m_managedBehaviors) {
behavior.second->Interrupt();
}
} }
void SkillComponent::RegisterCalculatedProjectile(const LWOOBJID projectileId, BehaviorContext* context, const BehaviorBranchContext& branch, const LOT lot, const float maxTime, void SkillComponent::RegisterCalculatedProjectile(const LWOOBJID projectileId, BehaviorContext* context, const BehaviorBranchContext& branch, const LOT lot, const float maxTime,