--- deliantra/server/ext/login.ext 2007/04/04 02:07:19 1.35 +++ deliantra/server/ext/login.ext 2007/04/17 10:06:33 1.41 @@ -17,7 +17,7 @@ my ($ns, $flags, $text) = @_; my $current = $Coro::current; - $ns->query ($flags, $text, sub { $current->ready; $current = $_[0]; }); + $ns->query ($flags, $text, sub { $current->ready; $current = $_[0] }); Coro::schedule while ref $current; $current @@ -139,6 +139,12 @@ $ns->extmap ($v); } elsif ($k eq "facecache") { + if (!$v) { + $v = 1; + $setup{$k} = $v; + $ns->send_drawinfo ("(trying to forcefully enable facecaching)", cf::NDI_RED); + } + $ns->facecache ($v); } elsif ($k eq "faceset") { @@ -160,8 +166,8 @@ } elsif ($k eq "mapsize") { my ($x, $y) = split /x/, $v; - $ns->mapx ($x = max 9, min cf::MAP_CLIENT_X, $x); - $ns->mapy ($y = max 9, min cf::MAP_CLIENT_Y, $y); + $ns->mapx ($x = max 9, min cf::MAP_CLIENT_X, ($x - 1) | 1); + $ns->mapy ($y = max 9, min cf::MAP_CLIENT_Y, ($y - 1) | 1); $setup{$k} = "${x}x${y}"; @@ -171,6 +177,9 @@ } elsif ($k eq "extendedTextInfos") { $ns->has_readable_type ($v); + } elsif ($k eq "smoothing") { # cfplus-style smoothing + $ns->smoothing ($v); + } elsif ($k eq "fxix") { $ns->fxix ($v); @@ -356,6 +365,19 @@ ); next; } + } else { + # unable to load the playerfile: + # check wether the player dir exists, which means the file is corrupted or + # something very similar. + if (!aio_stat cf::player::playerdir $user) { + $ns->send_drawinfo ( + "Unable to retrieve this player. It might be a locked or broken account. " + . "If this is your account, ask a dungeon master for assistance. " + . "Otherwise choose a different login name.", + cf::NDI_RED + ); + next; + } } # the rest of this function is character creation @@ -525,7 +547,7 @@ eval { if ($pl->{last_save} + $SAVE_TIMEOUT <= $cf::RUNTIME) { - $cf::WAIT_FOR_TICK_ONE->wait; + cf::wait_for_tick_begin; $pl->save; unless ($pl->active) {