mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Fix for bot combat line-of-sight issue (let me know if this causes zone training again)
This commit is contained in:
parent
3383f65ff7
commit
171474f1d2
12
zone/bot.cpp
12
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<uint32>(PlayerState::Aggressive)))
|
||||
SendAddPlayerState(PlayerState::Aggressive);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user