Pathfinder now correctly paths to the closest accessible tile of an object, not the closest tile numerically. This should fix instances where you end up running around an object before interacting with it.

This commit is contained in:
Ceikry
2022-06-11 12:35:16 +00:00
committed by Ryan
parent 7249aaed5e
commit 5c28375c3b
5 changed files with 121 additions and 11 deletions
@@ -207,7 +207,7 @@ object InteractionListeners {
val flag = when(type){
3 -> DestinationFlag.ITEM
2 -> DestinationFlag.ENTITY
1 -> DestinationFlag.OBJECT
1 -> null
else -> DestinationFlag.OBJECT
}
@@ -149,6 +149,13 @@ object ManagementEvents {
}
is FriendUpdate -> {
val remove = event.type == FriendUpdate.Type.REMOVE
val f = Repository.getPlayerByName(event.friend)
val p = Repository.getPlayerByName(event.username)
val world = if (f != null) GameWorld.settings!!.worldId else 0
}
is PrivateMessage -> {
val sender = Repository.getPlayerByName(event.sender)
val receiver = Repository.getPlayerByName(event.receiver)