Skip to content

Commit

Permalink
When we traverse a level-changer in the map, set x and y too
Browse files Browse the repository at this point in the history
  • Loading branch information
sartak committed Jan 15, 2010
1 parent 389b695 commit d024278
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/TAEB/Debug/Map.pm
Expand Up @@ -83,8 +83,11 @@ sub _change_level_command {
my $direction = shift;

if ($self->tile->does('TAEB::World::Tile::Role::LevelChanger') && $self->tile->other_side_known) {
my $other_level = $self->tile->other_side->level;
my $other_tile = $self->tile->other_side;
my $other_level = $other_tile->level;
$self->z_with_branch($other_level->z, $other_level);
$self->x($other_tile->x);
$self->y($other_tile->y);
}
else {
$self->z_with_branch($self->z + $direction);
Expand Down

0 comments on commit d024278

Please sign in to comment.