Merge remote-tracking branch 'origin/bugfix-stuck-location'

This commit is contained in:
2023-07-22 13:26:11 -04:00
5 changed files with 5 additions and 27 deletions
+4
View File
@@ -1245,6 +1245,10 @@ public class Building extends AbstractWorldObject {
stuckLocation = stuckLocations.get(ThreadLocalRandom.current().nextInt(stuckLocations.size())).getLocation();
stuckLocation = this.getLoc().add(stuckLocation);
// Rotate stuck position by the building rotation
stuckLocation = Vector3fImmutable.rotateAroundPoint(this.getLoc(), stuckLocation, this.getBounds().getQuaternion().angleY);
return stuckLocation;
}
-5
View File
@@ -922,11 +922,6 @@ public class Mob extends AbstractIntelligenceAgent {
this.bindLoc = building.getLoc().add(slotLocation);
// Rotate MOB by slot rotation
slotRotation = BuildingManager.getSlotLocation(building, slot).getRotation();
this.setRot(new Vector3f(0, slotRotation.y, 0));
}
// Rotate slot position by the building rotation
-5
View File
@@ -814,11 +814,6 @@ public class NPC extends AbstractCharacter {
this.loc = new Vector3fImmutable(bindLoc);
// Rotate NPC by slot rotation
slotRotation = BuildingManager.getSlotLocation(building, slot).getRotation();
this.setRot(new Vector3f(0, slotRotation.y, 0));
// Rotate NPC rotation by the building's rotation
slotRotation = new Quaternion().fromAngles(0, acos(this.getRot().y) * 2, 0);