mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
fixed bug I introduced in f87c87f5d4 where bots wont dismount when they should
This commit is contained in:
@@ -132,11 +132,14 @@ bool CheckMountStateAction::isUseful()
|
|||||||
if (bot->HasUnitState(UNIT_STATE_IN_FLIGHT))
|
if (bot->HasUnitState(UNIT_STATE_IN_FLIGHT))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// checks both outdoors flag, and whether bot is clipping below floor slightly
|
if (!bot->IsOutdoors())
|
||||||
// because that will cause bot to falsely indicate outdoors state and try
|
return false;
|
||||||
// mount indoors (seems to mostly be an issue in tunnels of WSG and AV)
|
|
||||||
if (!bot->IsOutdoors() || bot->GetPositionZ() < bot->GetMapWaterOrGroundLevel(
|
// in addition to checking IsOutdoors, also check whether bot is clipping below floor slightly because that will
|
||||||
bot->GetPositionX(), bot->GetPositionY(), bot->GetPositionZ()))
|
// cause bot to falsly indicate they are outdoors. This fixes bug where bot tries to mount indoors (which seems
|
||||||
|
// to mostly be an issue in tunnels of WSG and AV)
|
||||||
|
if (!bot->IsMounted() && bot->GetPositionZ() < bot->GetMapWaterOrGroundLevel(
|
||||||
|
bot->GetPositionX(), bot->GetPositionY(), bot->GetPositionZ()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (bot->InArena())
|
if (bot->InArena())
|
||||||
|
|||||||
Reference in New Issue
Block a user