Fixed 2 bugs with map loading and sending
When a map was sent the receiver didn't save the resolutions tihs meant that if the original map owner left or wasn't the party leader the map would be blank when new users joined. Also if a map sender left when sending a map and rejoined their version of the map would be overriden by a corrupted version.
This commit is contained in:
@@ -31,13 +31,15 @@ function MapInteraction({
|
||||
disabledControls,
|
||||
}) {
|
||||
let mapSourceMap = map;
|
||||
if (map && map.type === "file") {
|
||||
if (
|
||||
map.resolutions &&
|
||||
map.quality !== "original" &&
|
||||
map.resolutions[map.quality]
|
||||
) {
|
||||
if (map && map.type === "file" && map.resolutions) {
|
||||
// Set to the quality if available
|
||||
if (map.quality !== "original" && map.resolutions[map.quality]) {
|
||||
mapSourceMap = map.resolutions[map.quality];
|
||||
} else if (!map.file) {
|
||||
// If no file fallback to the highest resolution
|
||||
for (let resolution in map.resolutions) {
|
||||
mapSourceMap = map.resolutions[resolution];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user