mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 12:31:31 +00:00
Merge pull request #1123 from noudess/amphibious
Allow amphibious mobs underwater to follow los and not fall to water bottom when pathing
This commit is contained in:
commit
4ac62a2ddc
@ -1088,6 +1088,17 @@ void MobMovementManager::UpdatePath(Mob *who, float x, float y, float z, MobMove
|
|||||||
PushFlyTo(ent.second, x, y, z, mob_movement_mode);
|
PushFlyTo(ent.second, x, y, z, mob_movement_mode);
|
||||||
PushStopMoving(ent.second);
|
PushStopMoving(ent.second);
|
||||||
}
|
}
|
||||||
|
// Below for npcs that can traverse land or water so they don't sink
|
||||||
|
else if (who->GetFlyMode() == GravityBehavior::Water &&
|
||||||
|
zone->watermap->InLiquid(who->GetPosition()) &&
|
||||||
|
zone->watermap->InLiquid(glm::vec3(x, y, z)) &&
|
||||||
|
zone->zonemap->CheckLoS(who->GetPosition(), glm::vec3(x, y, z))) {
|
||||||
|
auto iter = _impl->Entries.find(who);
|
||||||
|
auto &ent = (*iter);
|
||||||
|
|
||||||
|
PushSwimTo(ent.second, x, y, z, mob_movement_mode);
|
||||||
|
PushStopMoving(ent.second);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
UpdatePathGround(who, x, y, z, mob_movement_mode);
|
UpdatePathGround(who, x, y, z, mob_movement_mode);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user