diff --git a/src/components/gameMaster/zoneEditor/ZoneEditor.vue b/src/components/gameMaster/zoneEditor/ZoneEditor.vue index 5bdd769..14732a1 100644 --- a/src/components/gameMaster/zoneEditor/ZoneEditor.vue +++ b/src/components/gameMaster/zoneEditor/ZoneEditor.vue @@ -24,12 +24,20 @@ diff --git a/src/components/zone/Zone.vue b/src/components/zone/Zone.vue index 0d78ca7..f8ca30b 100644 --- a/src/components/zone/Zone.vue +++ b/src/components/zone/Zone.vue @@ -42,7 +42,6 @@ gameStore.connection!.on('zone:teleport', async (data: zoneLoadData) => { // Fetch assets for new zone await gameStore.fetchZoneAssets(data.zone.id) - // wait 1.5 sec await loadAssets(scene) /** diff --git a/src/stores/game.ts b/src/stores/game.ts index 4ed735c..f91cf8a 100644 --- a/src/stores/game.ts +++ b/src/stores/game.ts @@ -68,8 +68,8 @@ export const useGameStore = defineStore('game', { return false }) }, - async fetchAllAssets() { - return fetch(config.server_endpoint + '/assets') + async fetchAllZoneAssets() { + return fetch(config.server_endpoint + '/assets/zone') .then((response) => response.json()) .then((assets) => { // Only add the zones that are not already in the store