From b4f112ee89ce02a12804e358d28fe7199016643d Mon Sep 17 00:00:00 2001 From: c0508383 Date: Mon, 11 Jul 2022 21:16:32 -0500 Subject: [PATCH] IWorld: -Fixed offset not working right on rayCastEntities() --- src/main/java/noppes/npcs/scripted/ScriptWorld.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/noppes/npcs/scripted/ScriptWorld.java b/src/main/java/noppes/npcs/scripted/ScriptWorld.java index 8113737a1..8f9a26a47 100644 --- a/src/main/java/noppes/npcs/scripted/ScriptWorld.java +++ b/src/main/java/noppes/npcs/scripted/ScriptWorld.java @@ -408,7 +408,7 @@ public class ScriptWorld implements IWorld { ArrayList entities = new ArrayList<>(); Vec3 currentPos = Vec3.createVectorHelper(startPos[0], startPos[1], startPos[2]); int rep = 0; - currentPos.addVector(lookVector[0]*offset, lookVector[1]*offset, lookVector[2]*offset); + currentPos = currentPos.addVector(lookVector[0]*offset, lookVector[1]*offset, lookVector[2]*offset); while (rep++ < maxDistance + 10) { currentPos = currentPos.addVector(lookVector[0], lookVector[1], lookVector[2]);