1
0
forked from noxious/server

Typescript fix

This commit is contained in:
Dennis Postma 2024-08-03 19:19:38 +02:00
parent a9994f6d95
commit 81d4d9bf49

View File

@ -26,7 +26,7 @@ export default function setupCharacterMove(socket: TSocket, io: Server) {
// Cancel any ongoing movement for this character
const moveToken = Symbol('moveToken')
characterMoveTokens.set(socket.character.id, moveToken)
characterMoveTokens.set(socket.character.id.toString(), moveToken)
const grid = await ZoneManager.getGrid(socket.character.zoneId)
@ -64,7 +64,7 @@ async function moveAlongPath(socket: TSocket, io: Server, path: Node[], grid: nu
for (let i = 0; i < path.length; i++) {
// Check if this movement has been cancelled
if (characterMoveTokens.get(socket.character.id) !== moveToken) {
if (characterMoveTokens.get(socket.character.id.toString()) !== moveToken) {
console.log('Movement cancelled for character', socket.character.id)
return
}