v2.5.0: fixed crashes when descending to floor 26

This commit is contained in:
Evan Debenham
2024-08-22 12:27:04 -04:00
parent 7a2b4639ee
commit 400eebcac1

View File

@@ -133,7 +133,7 @@ public class InterlevelScene extends PixelScene {
if (Statistics.deepestFloor >= loadingDepth) { if (Statistics.deepestFloor >= loadingDepth) {
fadeTime = FAST_FADE; fadeTime = FAST_FADE;
} else if (loadingDepth == 6 || loadingDepth == 11 } else if (loadingDepth == 6 || loadingDepth == 11
|| loadingDepth == 16 || loadingDepth == 21) { || loadingDepth == 16 || loadingDepth == 21 || loadingDepth == 26) {
fadeTime = SLOW_FADE; fadeTime = SLOW_FADE;
} }
} }
@@ -264,7 +264,7 @@ public class InterlevelScene extends PixelScene {
align(loadingText); align(loadingText);
add(loadingText); add(loadingText);
if (mode == Mode.DESCEND){ if (mode == Mode.DESCEND && lastRegion <= 5){
if (Dungeon.hero == null || (loadingDepth > Statistics.deepestFloor && loadingDepth % 5 == 1)){ if (Dungeon.hero == null || (loadingDepth > Statistics.deepestFloor && loadingDepth % 5 == 1)){
storyMessage = PixelScene.renderTextBlock(Document.INTROS.pageBody(region), 6); storyMessage = PixelScene.renderTextBlock(Document.INTROS.pageBody(region), 6);
storyMessage.maxWidth( PixelScene.landscape() ? 180 : 125); storyMessage.maxWidth( PixelScene.landscape() ? 180 : 125);