Don't send param with zone:character:join

This commit is contained in:
2024-09-21 22:05:35 +02:00
parent 83d9cc1516
commit 88bd039a04
2 changed files with 138 additions and 141 deletions

View File

@ -27,18 +27,15 @@ type zoneLoadData = {
}
gameStore.connection!.emit('zone:character:join', { zoneId: gameStore.character!.zoneId }, async (response: zoneLoadData) => {
gameStore.connection!.emit('zone:character:join', async (response: zoneLoadData) => {
// Fetch assets for new zone
await gameStore.fetchZoneAssets(response.zone.id)
await loadAssets(scene)
// Set zone and characters
zoneStore.setZone(response.zone)
zoneStore.setCharacters(response.characters)
scene.cameras.main.setScroll(-(scene.cameras.main.worldView.width/2) - gameStore.character.relativePosition.x, -(scene.cameras.main.worldView.height/2) + gameStore.character.relativePosition.y)
console.log('--- CHARACTER JOIN')
})
// Event listeners