mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
fix(Core/RPG): Clear stale spline + lastPath on quest-complete transition
This commit is contained in:
parent
caa8459216
commit
3f79fe44f2
@ -492,6 +492,15 @@ bool NewRpgDoQuestAction::DoCompletedQuest(NewRpgInfo::DoQuest& data)
|
||||
data.lastReachPOI = 0;
|
||||
data.pos = pos;
|
||||
data.objectiveIdx = -1;
|
||||
|
||||
// Drop the spline + lastPath that DoIncompleteQuest committed
|
||||
// to the now-completed objective. Without this, MoveFarTo on
|
||||
// the next tick hits the bot->isMoving() / lastPath-reuse
|
||||
// early-exits at the top of MoveFarTo and rides the stale
|
||||
// path instead of replanning toward the turn-in POI. (This
|
||||
// is what `.playerbot bot self` masks by recreating the AI.)
|
||||
bot->GetMotionMaster()->Clear();
|
||||
AI_VALUE(LastMovement&, "last movement").clear();
|
||||
}
|
||||
|
||||
if (data.pos == WorldPosition())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user