Skip to content

Commit

Permalink
Fixed loading corrupt last cave
Browse files Browse the repository at this point in the history
  • Loading branch information
Rackover committed Jun 23, 2019
1 parent 7579c02 commit 129a5b4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/loadMisc.gml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ else{
}

// Last cave
if (!is_undefined(misc[? "lastCave"]) && misc[? "lastCave"] != noone){
var lastCave = misc[? "lastCave"];
if (isValidCave(lastCave)){
// Changed planet recently, last cave should be overriden
log("Set last cave from savegame, from "+json_encode(object_game.lastCave)+" to "+json_encode(misc[? "lastCave"]));
object_game.lastCave = misc[? "lastCave"];
log("Set last cave from savegame, from "+json_encode(object_game.lastCave)+" to "+json_encode(lastCave));
object_game.lastCave = lastCave;
misc[? "lastCave"] = noone;
object_game.currentLevel = 1;
}
Expand Down

0 comments on commit 129a5b4

Please sign in to comment.