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

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

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,