Skip to content

Commit

Permalink
Don't re-enter dungeons
Browse files Browse the repository at this point in the history
  • Loading branch information
whitingjp committed Dec 18, 2011
1 parent 9cf6547 commit 1389656
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Galaxy.as
Expand Up @@ -94,9 +94,12 @@ package
var dungeon:Dungeon = Dungeon(FP.world);
if(overworld)
{
trace("entering sub dungeon: "+dungeon.current_room_key);
current_dungeon_key = dungeon.current_room_key;
enter_dungeon(dungeon.current_room_key);
if(!dungeon_completion[dungeon.current_room_key])
{
trace("entering sub dungeon: "+dungeon.current_room_key);
current_dungeon_key = dungeon.current_room_key;
enter_dungeon(dungeon.current_room_key);
}
} else
{
trace("returning to overworld: ");
Expand Down
10 changes: 9 additions & 1 deletion Orb.as
Expand Up @@ -45,7 +45,15 @@ package
layer = -y;

anim_timer = (anim_timer+1)%16;
if(source)
if(Main.galaxy.overworld)
{
var key:String = Dungeon(FP.world).current_room_key;
if(Main.galaxy.dungeon_completion[key])
sprite.frame = 2;
else
sprite.frame = anim_timer/4;
}
else if(source)
sprite.frame = anim_timer/4;
else if(on)
sprite.frame = 2;
Expand Down

0 comments on commit 1389656

Please sign in to comment.