--- deliantra/server/ext/login.ext 2008/01/13 12:27:12 1.80 +++ deliantra/server/ext/login.ext 2008/05/28 05:12:01 1.87 @@ -94,8 +94,6 @@ warn $ob->name, " map reset after logout, logout age $age (>= $MAX_DISCONNECT_TIME)\n";#d# - ($map, $x, $y) = $pl->savebed; - if ($age >= $MAX_DISCONNECT_TIME) { $ob->message ( "You didn't use a bed to reality to leave this realm, leaving your body in great danger. " @@ -107,8 +105,10 @@ # kill them. # reminds me of the famous badness 10000 syndrome... $ob->stats->hp (-10000); #] if they survive this they deserved to live - $pl->killer ("a cave-in"); + my $killer = cf::arch::get "killer_login"; $pl->killer ($killer); $killer->destroy; } else { + ($map, $x, $y) = $pl->savebed; + $ob->message ( "You didn't use a bed to reality to leave this realm, leaving your body in great danger. " . "Fortunately, some friendly dwellers found you, checked your passport, and brought you to safety. " @@ -379,7 +379,7 @@ $ob->roll_stats; } - Coro::Timer::sleep 0.2; + Coro::Timer::sleep 0.05; } $ob->set_animation (2); @@ -400,6 +400,9 @@ Coro::Timer::sleep 0.2; } + # create the playerdir, if necessary, as chargen_race_done did it before + # presumably because of unique maps + aio_mkdir playerdir $pl, 0770; $pl->chargen_race_done; while () { @@ -467,7 +470,7 @@ $pl->savebed ($bed->map->path, $bed->x, $bed->y); cf::async { $pl->save }; - $pl->killer ("left"); + my $killer = cf::arch::get "killer_logout"; $pl->killer ($killer); $killer->destroy; $ob->check_score; $ob->reply (undef, "In the future, you will wake up here when you die."); @@ -551,13 +554,13 @@ my $a_ = $pl->refcnt;#d# my $b_ = $ob->refcnt;#d# - warn "player-scheduler refcnt ", $ob->name, " pl $pl_ref ob $ob_ref (C pl $a_ ob $b_)\n";#d# + warn "player-scheduler refcnt ", $ob->name, " pl $pl_ref/3 ob $ob_ref/3 (C pl $a_/1 ob $b_/2)\n";#d# } } } }; warn $@ if $@; - Coro::cede; + cf::cede_to_tick; }; } };