Add safeguard for issue with mobs pathing to 0,0,0 on teleport nodes with values 0,0,0 (#1140)

* IP limit and account session limit refactor - uses responses built into loginserver

* Fix an issue where teleport nodes with 0.0f as a value were added to routes when pathing.
This commit is contained in:
E Spause 2020-12-05 16:15:53 -05:00 committed by GitHub
parent 31019b8832
commit f26b3195c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1225,7 +1225,7 @@ void MobMovementManager::UpdatePathGround(Mob *who, float x, float y, float z, M
)
);
}
else {
else if(!next_node.teleport) {
if (zone->watermap->InLiquid(previous_pos)) {
PushSwimTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, mode);
}
@ -1345,7 +1345,7 @@ void MobMovementManager::UpdatePathUnderwater(Mob *who, float x, float y, float
next_node.pos.y
));
}
else {
else if(!next_node.teleport) {
PushSwimTo(ent.second, next_node.pos.x, next_node.pos.y, next_node.pos.z, movement_mode);
}
}