mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-25 16:52:25 +00:00
Add a sanity check to prevent mobs climbing steep walls
Ex. in OMM's room in anguish
This commit is contained in:
parent
0643bf9783
commit
c29bdd4b1d
@ -1023,6 +1023,8 @@ void Mob::ProcessForcedMovement()
|
|||||||
pLastChange = Timer::GetCurrentTime();
|
pLastChange = Timer::GetCurrentTime();
|
||||||
FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc
|
FixZ(); // so we teleport to the ground locally, we want the client to interpolate falling etc
|
||||||
} else if (--ForcedMovement) {
|
} else if (--ForcedMovement) {
|
||||||
|
if (normal.z < -0.15f) // prevent too much wall climbing. ex. OMM's room in anguish
|
||||||
|
normal.z = 0.0f;
|
||||||
auto proj = glm::proj(static_cast<glm::vec3>(m_Delta), normal);
|
auto proj = glm::proj(static_cast<glm::vec3>(m_Delta), normal);
|
||||||
m_Delta.x -= proj.x;
|
m_Delta.x -= proj.x;
|
||||||
m_Delta.y -= proj.y;
|
m_Delta.y -= proj.y;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user