mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 23:17:28 +00:00
Fix Stuns of duration zero (#938)
This commit is contained in:
parent
09157506bf
commit
dc7d0ce142
@ -179,7 +179,7 @@ void BaseCombatAIComponent::Update(const float deltaTime) {
|
|||||||
|
|
||||||
if (m_Disabled || m_Parent->GetIsDead())
|
if (m_Disabled || m_Parent->GetIsDead())
|
||||||
return;
|
return;
|
||||||
|
bool stunnedThisFrame = m_Stunned;
|
||||||
CalculateCombat(deltaTime); // Putting this here for now
|
CalculateCombat(deltaTime); // Putting this here for now
|
||||||
|
|
||||||
if (m_StartPosition == NiPoint3::ZERO) {
|
if (m_StartPosition == NiPoint3::ZERO) {
|
||||||
@ -192,7 +192,7 @@ void BaseCombatAIComponent::Update(const float deltaTime) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_Stunned) {
|
if (stunnedThisFrame) {
|
||||||
m_MovementAI->Stop();
|
m_MovementAI->Stop();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -248,13 +248,13 @@ void BaseCombatAIComponent::CalculateCombat(const float deltaTime) {
|
|||||||
|
|
||||||
if (m_Disabled) return;
|
if (m_Disabled) return;
|
||||||
|
|
||||||
if (m_StunTime > 0.0f) {
|
if (m_Stunned) {
|
||||||
m_StunTime -= deltaTime;
|
m_StunTime -= deltaTime;
|
||||||
|
|
||||||
if (m_StunTime > 0.0f) {
|
if (m_StunTime > 0.0f) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
m_StunTime = 0.0f;
|
||||||
m_Stunned = false;
|
m_Stunned = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user