[Bug Fix] Fix NPCs routing to 0.0, 0.0 on #summon (#3780)

# Notes
- Resolves #2474.
This commit is contained in:
Alex King
2023-12-17 20:24:24 -05:00
committed by GitHub
parent 286479198f
commit d3b46becd0
3 changed files with 17 additions and 22 deletions
+2 -2
View File
@@ -3511,14 +3511,14 @@ void Mob::GMMove(float x, float y, float z, float heading, bool save_guard_spot)
}
}
void Mob::GMMove(const glm::vec4 &position) {
void Mob::GMMove(const glm::vec4 &position, bool save_guard_spot) {
m_Position.x = position.x;
m_Position.y = position.y;
m_Position.z = position.z;
SetHeading(position.w);
mMovementManager->SendCommandToClients(this, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny);
if (IsNPC()) {
if (IsNPC() && save_guard_spot) {
CastToNPC()->SaveGuardSpot(position);
}
}