Skip to content

Commit d93df8c

Browse files
committed
Fix minor mistakes in previous commit
(cherry picked from AC commit 515e8c988cdf0ed5b9d46d41214afebb2de48b76)
1 parent 5c34de1 commit d93df8c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/server/game/AI/NpcBots/bot_ai.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19029,8 +19029,12 @@ void bot_ai::Evade()
1902919029
float dist = frand (0.f, nextNode->GetProximity() * 2.f);
1903019030
x = x + dist * std::cos(angle);
1903119031
y = y + dist * std::sin(angle);
19032-
if (me->GetMap())
19033-
z = me->GetMap()->GetHeight(me->GetPhaseMask(), x, y, z + 2);
19032+
float ground = z;
19033+
me->UpdateGroundPositionZ(x, y, ground);
19034+
if (ground > INVALID_HEIGHT)
19035+
z = ground;
19036+
else
19037+
z += 2.f;
1903419038
}
1903519039
homepos.Relocate(x, y, z, o);
1903619040
if (me->GetMap()->GetEntry()->IsContinent())

src/server/game/AI/NpcBots/botdatamgr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ void BotDataMgr::LoadWanderMap(bool reload, bool force_all_maps)
14221422
wp->SetFlags(BotWPFlags(flags));
14231423
wp->SetWaitTime(minwaittime, maxwaittime);
14241424
wp->SetProximity(proximity);
1425-
1425+
14261426
if (wp->HasFlag(BotWPFlags::BOTWP_FLAG_SPAWN) && !lstr.empty())
14271427
all_spawn_nodes.push_back(wp);
14281428

0 commit comments

Comments
 (0)