--- deliantra/server/lib/cf.pm 2011/05/01 16:58:16 1.566 +++ deliantra/server/lib/cf.pm 2011/05/02 16:16:00 1.567 @@ -1956,7 +1956,6 @@ # ?random/... random maps # /... normal maps # ~user/... per-player map of a specific user - # !up !down for quad maps, or other maps with up/down layers $path =~ s/$PATH_SEP/\//go; @@ -1967,20 +1966,6 @@ $base =~ s{[^/]+/?$}{}; $path = "$base/$path"; - - } elsif ($path eq '!up') { - $base && ref $base - or Carp::carp "normalise called with relative tile path and no base: '$path'"; - - my $uppth = $base->tile_path (cf::TILE_UP); - $path = $uppth if $uppth; - - } elsif ($path eq '!down') { - $base && ref $base - or Carp::carp "normalise called with relative tile path and no base: '$path'"; - - my $dpth = $base->tile_path (cf::TILE_DOWN); - $path = $dpth if $dpth; } for ($path) { @@ -2936,17 +2921,30 @@ unless (eval { $self->deactivate_recursive; # just to be sure - # random map handling - { + my $map = cf::map::normalise $exit->slaying, $exit->map; + my $x = $exit->stats->hp; + my $y = $exit->stats->sp; + + # special map handling + my $slaying = $exit->slaying; + + # special map handling + if ($slaying eq "/!") { my $guard = cf::lock_acquire "exit_prepare:$exit"; prepare_random_map $exit - if $exit->slaying eq "/!"; - } + if $slaying eq "/!"; # need to re-check after getting the lock - my $map = cf::map::normalise $exit->slaying, $exit->map; - my $x = $exit->stats->hp; - my $y = $exit->stats->sp; + } elsif ($slaying eq '!up') { + $map = $exit->map->tile_path (cf::TILE_UP); + $x = $exit->x; + $y = $exit->y; + + } elsif ($slaying eq '!down') { + $map = $exit->map->tile_path (cf::TILE_DOWN); + $x = $exit->x; + $y = $exit->y; + } $self->goto ($map, $x, $y);