From 5261e316c52b214dd4602397f4a620e5cee0d132 Mon Sep 17 00:00:00 2001 From: x12xx12x <44411062+12xx12@users.noreply.github.com> Date: Wed, 20 Apr 2022 08:21:41 +0200 Subject: handled the infinite loop and style --- src/Mobs/PathFinder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Mobs') diff --git a/src/Mobs/PathFinder.cpp b/src/Mobs/PathFinder.cpp index 260044f3b..2e832918a 100644 --- a/src/Mobs/PathFinder.cpp +++ b/src/Mobs/PathFinder.cpp @@ -236,7 +236,7 @@ bool cPathFinder::EnsureProperPoint(Vector3d & a_Vector, cChunk & a_Chunk) // Go down to the lowest air block. if (InTheAir) { - while (cChunkDef::IsValidHeight(a_Vector.addedY(-1))) + while (cChunkDef::IsValidHeight(BelowRel.addedY(-1))) { Chunk->GetBlockTypeMeta(BelowRel.addedY(-1), BlockType, BlockMeta); if (IsWaterOrSolid(BlockType)) -- cgit v1.2.3