v3.1.0: fixed a crash caused by platform rooms with new painter merges

This commit is contained in:
Evan Debenham
2025-05-16 14:23:56 -04:00
parent 4a9c866c96
commit 7be250ae9c

View File

@@ -49,7 +49,7 @@ public class PlatformRoom extends StandardRoom {
@Override @Override
public void merge(Level l, Room other, Rect merge, int mergeTerrain) { public void merge(Level l, Room other, Rect merge, int mergeTerrain) {
if (mergeTerrain != Terrain.CHASM if (mergeTerrain != Terrain.CHASM && connected.containsKey(other)
&& (other instanceof PlatformRoom || other instanceof ChasmRoom)){ && (other instanceof PlatformRoom || other instanceof ChasmRoom)){
super.merge(l, other, merge, Terrain.CHASM); super.merge(l, other, merge, Terrain.CHASM);
Painter.set(l, connected.get(other), Terrain.EMPTY_SP); Painter.set(l, connected.get(other), Terrain.EMPTY_SP);