--- deliantra/server/lib/cf.pm 2007/01/11 01:24:25 1.164 +++ deliantra/server/lib/cf.pm 2007/01/12 22:09:22 1.165 @@ -498,7 +498,19 @@ sub uniq_path { my ($self) = @_; - sprintf "%s/%s/%s", cf::localdir, cf::uniquedir, $self->_escaped_path + $self->{user_rel} || $self->{ext} + ? undef + : sprintf "%s/%s/%s", cf::localdir, cf::uniquedir, $self->_escaped_path +} + +sub customise_for { + my ($self, $map, $ob) = @_; + + if ($map->per_player) { + return cf::map::find ("~" . $ob->name . "/" . $map->{path}{path}); + } + + $map } # this is somewhat ugly, but style maps do need special treatment @@ -1600,16 +1612,6 @@ $self->reset; # polite request, might not happen } -sub customise_for { - my ($map, $ob) = @_; - - if ($map->per_player) { - return cf::map::find "~" . $ob->name . "/" . $map->{path}{path}; - } - - $map -} - =item cf::map::unique_maps Returns an arrayref of cf::path's of all shared maps that have @@ -1817,7 +1819,7 @@ (async { my $map = cf::map::find $path->as_string; - $map = $map->customise_for ($self) if $map; + $map = $map->{path}->customise_for ($map, $self) if $map; # warn "entering ", $map->path, " at ($x, $y)\n" # if $map;