forked from noxious/client
#100 : When switching to zone manager, GM character isnt removed from zone it was in
This commit is contained in:
parent
75c11c4bc0
commit
4cf6e68703
@ -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
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user