--- deliantra/server/lib/cf.pm 2007/01/24 22:42:49 1.194 +++ deliantra/server/lib/cf.pm 2007/01/26 20:59:57 1.195 @@ -1364,7 +1364,7 @@ $map->load_header or return; - if ($map->should_reset) { + if ($map->should_reset && 0) {#d#TODO# disabled, crashy (locking issue?) # doing this can freeze the server in a sync job, obviously #$cf::WAIT_FOR_TICK->wait; $map->reset; @@ -1901,16 +1901,21 @@ return unless $self->type == cf::PLAYER; + if ($exit->slaying eq "/!") { + #TODO: this should de-fi-ni-te-ly not be a sync-job + cf::sync_job { prepare_random_map $exit }; + } + + my $slaying = cf::map::normalise $exit->slaying, $exit->map && $exit->map->path; + my $hp = $exit->stats->hp; + my $sp = $exit->stats->sp; + $self->enter_link; (async { $self->deactivate_recursive; # just to be sure unless (eval { - prepare_random_map $exit - if $exit->slaying eq "/!"; - - my $path = new_from_path cf::map $exit->slaying, $exit->map && $exit->map->path; - $self->goto ($path, $exit->stats->hp, $exit->stats->sp); + $self->goto ($slaying, $hp, $sp); 1; }) {