Fix for loading assets, removed debugging logics

This commit is contained in:
2024-07-28 05:02:55 +02:00
parent 6c30e8d277
commit 6700ff7a5d
2 changed files with 23 additions and 19 deletions

View File

@ -38,14 +38,8 @@ export default function setupCharacterMove(socket: TSocket, io: Server) {
const start = { x: socket.character.position_x, y: socket.character.position_y };
const end = { x: data.position_x, y: data.position_y };
console.log('Starting position:', start);
console.log('Target position:', end);
console.log('Grid:', grid);
const path = AStar.findPath(start, end, grid);
console.log('Calculated path:', path);
if (path.length > 0) {
await moveAlongPath(socket, io, path, grid);
} else {