Pull out forced movement from push to it's own function

Had to pull this out so we could process it before mez/stun
This commit is contained in:
Michael Cook (mackal)
2018-03-08 19:42:40 -05:00
parent 5c87b8152d
commit 876335bb54
3 changed files with 17 additions and 8 deletions
+12 -8
View File
@@ -950,17 +950,12 @@ void Client::AI_Process()
}
}
void Mob::AI_Process() {
if (!IsAIControlled())
return;
if (!(AI_think_timer->Check() || attack_timer.Check(false)))
return;
void Mob::ProcessForcedMovement()
{
// we are being pushed, we will hijack this movement timer
// this also needs to be done before casting to have a chance to interrupt
// this flag won't be set if the mob can't be pushed (rooted etc)
if (ForcedMovement && AI_movement_timer->Check()) {
if (AI_movement_timer->Check()) {
bool bPassed = true;
auto z_off = GetZOffset();
glm::vec3 normal;
@@ -1019,6 +1014,15 @@ void Mob::AI_Process() {
m_Delta = glm::vec4(); // well, we failed to find a spot to be forced to, lets give up
}
}
}
void Mob::AI_Process() {
if (!IsAIControlled())
return;
if (!(AI_think_timer->Check() || attack_timer.Check(false)))
return;
if (IsCasting())
return;