Skip to content

Commit

Permalink
fix(map): handle missing layers when loading map chunks
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak committed Dec 31, 2023
1 parent 54002e9 commit c40777b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/map/MapArea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class MapArea {
const textures: string[] = areaData.get('MTEX');
const alpha: Uint8Array = chunkData.get('MCAL');

for (const { textureId, properties, alphaOffset, effectId } of chunkData.get('MCLY')) {
for (const { textureId, properties, alphaOffset, effectId } of chunkData.get('MCLY') ?? []) {
const texture = textures[textureId];

// Normalize all MCAL splats into 8-bit depth splats
Expand Down

0 comments on commit c40777b

Please sign in to comment.