mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-20 05:01:29 +00:00
Fix a situation where nav could end up not being reset
This commit is contained in:
parent
78adc7590e
commit
db5c42735c
@ -601,6 +601,12 @@ void MobMovementManager::NavigateTo(Mob *who, float x, float y, float z, MobMove
|
|||||||
void MobMovementManager::StopNavigation(Mob *who) {
|
void MobMovementManager::StopNavigation(Mob *who) {
|
||||||
auto iter = _impl->Entries.find(who);
|
auto iter = _impl->Entries.find(who);
|
||||||
auto &ent = (*iter);
|
auto &ent = (*iter);
|
||||||
|
auto &nav = ent.second.NavTo;
|
||||||
|
|
||||||
|
nav.navigate_to_x = 0.0;
|
||||||
|
nav.navigate_to_y = 0.0;
|
||||||
|
nav.navigate_to_z = 0.0;
|
||||||
|
nav.navigate_to_heading = 0.0;
|
||||||
|
|
||||||
if (true == ent.second.Commands.empty()) {
|
if (true == ent.second.Commands.empty()) {
|
||||||
PushStopMoving(ent.second);
|
PushStopMoving(ent.second);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user