mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Several crash fixes
This commit is contained in:
@@ -250,7 +250,7 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
|||||||
UpdateAIInternal(elapsed, min);
|
UpdateAIInternal(elapsed, min);
|
||||||
|
|
||||||
// test fix lags because of BG
|
// test fix lags because of BG
|
||||||
if (!bot->IsInCombat())
|
if (bot && !bot->IsInCombat())
|
||||||
min = true;
|
min = true;
|
||||||
|
|
||||||
YieldThread(min);
|
YieldThread(min);
|
||||||
|
|||||||
@@ -3955,6 +3955,10 @@ std::vector<WorldPosition> TravelMgr::getNextPoint(WorldPosition center, std::ve
|
|||||||
rnd -= weights[i];
|
rnd -= weights[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Peiru: Crash failsafe - if the retVec is still empty but points exist, return first point
|
||||||
|
if (retVec.empty() && points.size() > 0)
|
||||||
|
retVec.push_back(points[0]);
|
||||||
|
|
||||||
if (!retVec.empty())
|
if (!retVec.empty())
|
||||||
return retVec;
|
return retVec;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user