From dbc2a44911cf4998555792960529e9cdc6a8f6cf Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 6 Oct 2014 21:52:43 -0400 Subject: [PATCH] V0.2.1 : Game now saves on every floor transition (should make crashes much less disastrous) --- src/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/src/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java index 521bef897..f9a269ab7 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -317,6 +317,12 @@ public class Dungeon { hero.viewDistance = light == null ? level.viewDistance : Math.max( Light.DISTANCE, level.viewDistance ); observe(); + try { + saveAll(); + } catch (Exception e) { + //TODO: I need to add analytics code to this or something. + //Silent failure is really bad, don't want to interrupt the user but I do want to know if this fails. + } } public static boolean posNeeded() {