--- deliantra/server/ext/login.ext 2008/04/30 06:40:28 1.84 +++ deliantra/server/ext/login.ext 2008/09/16 16:03:02 1.90 @@ -75,6 +75,7 @@ sub enter_map { my ($pl) = @_; + warn $pl->ob->name, ": enter map 1\n";#d# my $ob = $pl->ob; my ($map, $x, $y) @@ -82,10 +83,13 @@ ? @{delete $ob->{_link_pos}} : ($pl->maplevel, $ob->x, $ob->y); + warn $pl->ob->name, ": enter map 2\n";#d# $ob->enter_link; + warn $pl->ob->name, ": enter map 3\n";#d# my $m = cf::map::find $map; my $time = delete $pl->{unclean_save}; + warn $pl->ob->name, ": enter map 4\n";#d# if ($time && $m) { if ($time < $m->{instantiate_time}) { @@ -105,9 +109,7 @@ # kill them. # reminds me of the famous badness 10000 syndrome... $ob->stats->hp (-10000); #] if they survive this they deserved to live - my $killer = cf::arch::get "killer_login"; - $pl->killer ($killer); - $killer->destroy; + my $killer = cf::arch::get "killer_login"; $pl->killer ($killer); $killer->destroy; } else { ($map, $x, $y) = $pl->savebed; @@ -130,7 +132,16 @@ } } - $ob->goto ($map, $x, $y); + warn $pl->ob->name, ": enter map 5\n";#d# + #$ob->goto ($map, $x, $y); + $ob->goto ($map, $x, $y, sub { + warn $pl->ob->name, ": enter map check\n";#d# + $_[0] + }, sub { + warn $pl->ob->name, ": enter map done\n";#d# + }); + warn $pl->ob->name, ": enter map 6\n";#d# + } # delete a player directory, be non-blocking AND synchronous... @@ -213,7 +224,7 @@ # read username while () { - $user = query $ns, 0, "What is your name?\n:"; + $user = query $ns, 0, "What is your name? (login names are case-sensitive)\n:"; if ($cf::LOGIN_LOCK{$user}) { $ns->send_drawinfo ( @@ -283,6 +294,7 @@ # password matches, wonderful my $pl = cf::player::find $user or next; $pl->connect ($ns); + $pl->ob->flag (cf::FLAG_DEBUG, 1);#d# temp enter_map $pl; last; } elsif (can_cleanup $pl, $mtime) { @@ -381,7 +393,7 @@ $ob->roll_stats; } - Coro::Timer::sleep 0.2; + Coro::Timer::sleep 0.05; } $ob->set_animation (2); @@ -402,6 +414,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 () { @@ -469,9 +484,7 @@ $pl->savebed ($bed->map->path, $bed->x, $bed->y); cf::async { $pl->save }; - my $killer = cf::arch::get "killer_logout"; - $pl->killer ($killer); - $killer->destroy; + 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.");