Skip to content

Commit 468a2d2

Browse files
committed
Fix RoofESP
1 parent ff5e3fa commit 468a2d2

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/main/java/net/wurstclient/hacks/RoofEspHack.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,17 @@ private void updateAnchorChunk()
388388
}
389389

390390
if(anchorChunk == null)
391+
{
392+
anchorChunk = playerChunk;
393+
scanTimer = 0;
394+
return;
395+
}
396+
397+
// Sticky mode keeps a stable scan center while you move within the
398+
// selected area, but should re-anchor once you leave that area.
399+
int radius = getChunkRange(selectedArea);
400+
if(Math.abs(playerChunk.x() - anchorChunk.x()) > radius
401+
|| Math.abs(playerChunk.z() - anchorChunk.z()) > radius)
391402
{
392403
anchorChunk = playerChunk;
393404
scanTimer = 0;

0 commit comments

Comments
 (0)