mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-01-22 12:47:01 +00:00
Allow the player to be interrupted (#881)
This commit is contained in:
parent
cd78a3dec7
commit
32f8bda538
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user