feature/MAPG-203-initial-multiplayer-implementation #5

Merged
bence merged 4 commits from feature/MAPG-203-initial-multiplayer-implementation into develop 2021-03-15 12:32:54 +01:00
Showing only changes of commit c317a0abf4 - Show all commits

View File

@ -26,7 +26,7 @@
});
Game.map.fitBounds(mapBounds);
MapGuesser.httpRequest('GET', '/game/' + mapId + '/newPlace.json', function () {
MapGuesser.httpRequest('GET', '/game/' + mapId + '/initialData.json', function () {
document.getElementById('loading').style.visibility = 'hidden';
document.getElementById('panoCover').style.visibility = 'hidden';
@ -35,8 +35,8 @@
return;
}
Game.panoId = this.response.panoId;
Game.pov = this.response.pov;
Game.panoId = this.response.place.panoId;
Game.pov = this.response.place.pov;
if (this.response.history) {
for (var i = 0; i < this.response.history.length; ++i) {
@ -200,8 +200,13 @@
document.getElementById('showSummaryButton').style.display = 'block';
}
Game.panoId = this.response.panoId;
Game.pov = this.response.pov;
if (this.response.newPlace) {
Game.panoId = this.response.newPlace.panoId;
Game.pov = this.response.newPlace.pov;
} else {
Game.panoId = null;
Game.pov = null;
}
}, data);
},