mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Demoted logging of long pathfinding attempts to "fine"
Actually abort pathfinding excessively long paths
This commit is contained in:
parent
068b252db6
commit
0af42c77c8
1 changed files with 10 additions and 2 deletions
|
|
@ -4,13 +4,15 @@ import core.game.world.GameWorld
|
||||||
import core.game.world.map.Direction
|
import core.game.world.map.Direction
|
||||||
import core.game.world.map.Location
|
import core.game.world.map.Location
|
||||||
import core.game.world.map.Point
|
import core.game.world.map.Point
|
||||||
|
import core.tools.*
|
||||||
|
import core.api.*
|
||||||
import core.api.utils.Vector
|
import core.api.utils.Vector
|
||||||
import core.ServerConstants
|
import core.ServerConstants
|
||||||
|
|
||||||
import java.util.Comparator
|
import java.util.Comparator
|
||||||
import java.util.PriorityQueue
|
import java.util.PriorityQueue
|
||||||
|
|
||||||
import java.io.File
|
import java.io.*
|
||||||
import javax.imageio.ImageIO
|
import javax.imageio.ImageIO
|
||||||
import java.awt.image.BufferedImage
|
import java.awt.image.BufferedImage
|
||||||
|
|
||||||
|
|
@ -110,7 +112,13 @@ internal constructor() : Pathfinder() {
|
||||||
end = start!!.transform(vec)
|
end = start!!.transform(vec)
|
||||||
} else throw Exception("Pathfinding distance exceeds server max! -> " + mag.toString() + " {" + start + "->" + end + "}")
|
} else throw Exception("Pathfinding distance exceeds server max! -> " + mag.toString() + " {" + start + "->" + end + "}")
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
e.printStackTrace()
|
val sw = StringWriter()
|
||||||
|
val pw = PrintWriter(sw)
|
||||||
|
e.printStackTrace(pw)
|
||||||
|
log(this::class.java, Log.FINE, sw.toString())
|
||||||
|
val p = Path()
|
||||||
|
p.isMoveNear = true
|
||||||
|
return p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val path = Path()
|
val path = Path()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue