Skip to content

Commit 5802901

Browse files
committed
Fixed Mob Pathfinding
1 parent 651fc0b commit 5802901

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

source/world/entity/Mob.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,8 @@ void Mob::lookAt(Entity* pEnt, float a3, float a4)
686686
float x1 = atan2f(diffZ, diffX);
687687
float x2 = atan2f(q1, p1);
688688

689-
setRot(Vec2(-rotlerp(m_rot.x, x2 * 180.0f / float(M_PI), a4),
690-
rotlerp(m_rot.y, x1 * 180.0f / float(M_PI) - 90.0f, a3)));
689+
setRot(Vec2(rotlerp(m_rot.x, x1 * 180.0f / float(M_PI) - 90.0f, a4),
690+
-rotlerp(m_rot.y, x2 * 180.0f / float(M_PI), a3)));
691691
}
692692

693693
bool Mob::canSpawn()

source/world/entity/PathfinderMob.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void PathfinderMob::updateAi()
212212
lookAt(m_pAttackTarget, MAX_TURN, MAX_TURN);
213213

214214
// if we hit a wall while moving
215-
if (m_bHorizontalCollision && !isPathFinding())
215+
if (m_bHorizontalCollision && isPathFinding())
216216
m_bJumping = true;
217217

218218
// if we're in water, try to swim up

0 commit comments

Comments
 (0)