mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +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.
|
// Let's check if we have a los with our target.
|
||||||
// If we don't, our hate_list is wiped.
|
// If we don't, our hate_list is wiped.
|
||||||
// Else, it was causing the bot to aggro behind wall etc... causing massive trains.
|
// 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();
|
WipeHateList();
|
||||||
if(IsMoving()) {
|
if(IsMoving()) {
|
||||||
SetHeading(0);
|
SetHeading(0);
|
||||||
@ -2228,6 +2228,16 @@ void Bot::AI_Process() {
|
|||||||
}
|
}
|
||||||
return;
|
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)))
|
if (!(m_PlayerState & static_cast<uint32>(PlayerState::Aggressive)))
|
||||||
SendAddPlayerState(PlayerState::Aggressive);
|
SendAddPlayerState(PlayerState::Aggressive);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user