From 171474f1d24a98bedb323c5e78536144aeb65185 Mon Sep 17 00:00:00 2001 From: Uleat Date: Fri, 24 Feb 2017 10:02:50 -0500 Subject: [PATCH] Fix for bot combat line-of-sight issue (let me know if this causes zone training again) --- zone/bot.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index cb5f89ed2..98d622742 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2217,7 +2217,7 @@ void Bot::AI_Process() { // Let's check if we have a los with our target. // If we don't, our hate_list is wiped. // Else, it was causing the bot to aggro behind wall etc... causing massive trains. - if(!CheckLosFN(GetTarget()) || GetTarget()->IsMezzed() || !IsAttackAllowed(GetTarget())) { + if(GetTarget()->IsMezzed() || !IsAttackAllowed(GetTarget())) { WipeHateList(); if(IsMoving()) { SetHeading(0); @@ -2228,6 +2228,16 @@ void Bot::AI_Process() { } return; } + else if (!CheckLosFN(GetTarget())) { + if (!IsRooted()) { + Mob* follow = entity_list.GetMob(GetFollowID()); + if (follow) + CalculateNewPosition2(follow->GetX(), follow->GetY(), follow->GetZ(), GetRunspeed()); + return; + } + + return; + } if (!(m_PlayerState & static_cast(PlayerState::Aggressive))) SendAddPlayerState(PlayerState::Aggressive);