diff --git a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollow.java b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollow.java index 767faa3f..39dff84d 100644 --- a/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollow.java +++ b/src/main/java/com/eu/habbo/habbohotel/pets/actions/ActionFollow.java @@ -11,16 +11,14 @@ import com.eu.habbo.threading.runnables.PetFollowHabbo; public class ActionFollow extends PetAction { public ActionFollow() { - super(PetTasks.FOLLOW, true); - this.statusToRemove.add(RoomUnitStatus.MOVE); - this.statusToRemove.add(RoomUnitStatus.LAY); - this.statusToRemove.add(RoomUnitStatus.DEAD); + super(PetTasks.FOLLOW, false); } @Override public boolean apply(Pet pet, Habbo habbo, String[] data) { - pet.clearPosture(); + pet.clearPosture(); + pet.setTask(PetTasks.FOLLOW); Emulator.getThreading().run(new PetFollowHabbo(pet, habbo, 0)); if (pet.getHappyness() > 75) diff --git a/src/main/java/com/eu/habbo/threading/runnables/PetFollowHabbo.java b/src/main/java/com/eu/habbo/threading/runnables/PetFollowHabbo.java index b790916f..d5a0ebe2 100644 --- a/src/main/java/com/eu/habbo/threading/runnables/PetFollowHabbo.java +++ b/src/main/java/com/eu/habbo/threading/runnables/PetFollowHabbo.java @@ -39,7 +39,11 @@ public class PetFollowHabbo implements Runnable { this.pet.setTask(PetTasks.FOLLOW); } } - Emulator.getThreading().run(this, 500); + if(target.distance(this.pet.getRoomUnit().getCurrentLocation()) > 1) { + Emulator.getThreading().run(this, 500); + } else { + this.pet.setTask(PetTasks.FREE); + } } } }