怪物死亡和世界宝箱随机掉落

This commit is contained in:
flswld committed 2023-03-29 14:59:53 +08:00
1 parent 13ee58cac9
commit ecec5a67ed
41 files changed
+875 -709

No files matched your search

+5
View File
@@ -71,6 +71,11 @@ func (w *WorldStatic) SetTerrain(x int16, y int16, z int16) {
}
func (w *WorldStatic) Pathfinding(startPos alg.MeshVector, endPos alg.MeshVector) (bool, []alg.MeshVector) {
defer func() {
if err := recover(); err != nil {
logger.Error("pathfinding error, panic, startPos: %v, endPos: %v", startPos, endPos)
}
}()
bfs := alg.NewBFS()
bfs.InitMap(
w.terrain,