forked from noxious/server
Small improvement teleports
This commit is contained in:
@ -39,7 +39,11 @@ class MapCharacter {
|
||||
|
||||
// Leave map and remove from manager
|
||||
socket.leave(this.character.map.id)
|
||||
MapManager.removeCharacter(this.character.id)
|
||||
|
||||
const map = MapManager.getMapById(this.character.map.id)
|
||||
if (map) {
|
||||
await map.removeCharacter(this.character.id)
|
||||
}
|
||||
|
||||
// Notify map players
|
||||
io.in(this.character.map.id).emit(SocketEvent.MAP_CHARACTER_LEAVE, this.character.id)
|
||||
|
Reference in New Issue
Block a user