1
0
forked from noxious/server

Removed if check since character is always in a map

This commit is contained in:
Dennis Postma 2025-02-16 17:20:00 +01:00
parent 562935c6e8
commit 67984f3e89

View File

@ -38,13 +38,11 @@ class MapCharacter {
await this.savePosition() await this.savePosition()
// Leave map and remove from manager // Leave map and remove from manager
if (this.character.map) { socket.leave(this.character.map.id)
socket.leave(this.character.map.id) MapManager.removeCharacter(this.character.id)
MapManager.removeCharacter(this.character.id)
// Notify map players // Notify map players
io.in(this.character.map.id).emit(SocketEvent.MAP_CHARACTER_LEAVE, this.character.id) io.in(this.character.map.id).emit(SocketEvent.MAP_CHARACTER_LEAVE, this.character.id)
}
// Notify all players // Notify all players
io.emit(SocketEvent.CHARACTER_DISCONNECT, this.character.id) io.emit(SocketEvent.CHARACTER_DISCONNECT, this.character.id)