--- deliantra/server/ext/login.ext 2008/01/07 01:55:19 1.78 +++ deliantra/server/ext/login.ext 2008/01/13 09:19:56 1.79 @@ -54,13 +54,20 @@ 1 } -sub safe_spot($$$) { - my ($m, $x, $y) = @_; +sub safe_spot($) { + my ($pl) = @_; + + my $ob = $pl->ob; - return 0; - warn join ":", $m->at ($x, $y);#d# - warn "FOO$m { ".scalar ($m->at ($x, $y))." }\n"; - return 0; + my $m = $ob->map + or return; + my $x = $ob->x; + my $y = $ob->y; + +# return 0;#d# +# warn join ":", $m->at ($x, $y);#d# +# warn "FOO$m { ".scalar ($m->at ($x, $y))." }\n"; +# return 0; scalar grep $_->type == cf::SAVEBED, $m->at ($x, $y) } @@ -80,7 +87,7 @@ my $m = cf::map::find $map; my $time = delete $pl->{unclean_save}; - if ($time && $m && !safe_spot $m, $x, $y) { + if ($time && $m) { if ($time < $m->{instantiate_time}) { # the map was reset in the meantime my $age = $cf::RUNTIME - $time; @@ -153,12 +160,12 @@ *** *** Look at your client preferences: *** -*** CFPlus: all known versions automatically enable the facecache. +*** deliantra: all known versions automatically enable the facecache. *** cfclient: use the -cache commandline option. *** cfclient: map will not redraw automatically (bug). *** gcfclient: use -cache commandline option, or enable *** gcfclient: Client => Configure => Map & Image => Cache Images. -*** jcrossclient: your client is broken, use CFPlus or gcfclient. +*** jcrossclient: your client is broken, use deliantra or gcfclient. *** *** EOF @@ -492,7 +499,9 @@ $_->ob->message ("$name left the game.", cf::NDI_DK_ORANGE | cf::NDI_UNIQUE) for cf::player::list; } else { $_->ob->message ("$name uncerimoniously disconnected.", cf::NDI_DK_ORANGE | cf::NDI_UNIQUE) for cf::player::list; - $pl->{unclean_save} = $cf::RUNTIME; + warn "unclean\n" unless safe_spot $pl;#d# + $pl->{unclean_save} = $cf::RUNTIME + unless safe_spot $pl; } }, );