1
0
forked from noxious/client

#100 : When switching to zone manager, GM character isnt removed from zone it was in

This commit is contained in:
Dennis Postma 2024-09-15 02:01:36 +02:00
parent 75c11c4bc0
commit 4cf6e68703

View File

@ -8,6 +8,8 @@ type TeleportSettings = {
toPositionY: number
}
const gameStore = useGameStore()
export const useZoneEditorStore = defineStore('zoneEditor', {
state: () => ({
active: false,
@ -41,6 +43,7 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
}),
actions: {
toggleActive() {
if (!this.active) gameStore.connection?.emit('zone:character:leave')
if (this.active) this.reset()
this.active = !this.active
},