[Crash] Fix zone crash caused by NPC::MoveTo (#4639)

This commit is contained in:
catapultam-habeo 2025-02-03 17:29:39 -06:00 committed by GitHub
parent 91a0e14509
commit ff86cc3b8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -206,6 +206,9 @@ void NPC::PauseWandering(int pausetime)
void NPC::MoveTo(const glm::vec4 &position, bool saveguardspot)
{ // makes mob walk to specified location
if (!AI_walking_timer) {
return;
}
if (IsNPC() && GetGrid() != 0) { // he is on a grid
if (GetGrid() < 0) { // currently stopped by a quest command
SetGrid(0 - GetGrid()); // get him moving again