--- deliantra/server/ext/login.ext 2007/12/26 21:38:02 1.75 +++ deliantra/server/ext/login.ext 2007/12/28 19:40:22 1.76 @@ -54,6 +54,12 @@ 1 } +sub safe_spot($$$) { + my ($m, $x, $y) = @_; + + scalar grep $_->type == cf::SAVEBED, $m->at ($x, $y) +} + sub enter_map { my ($pl) = @_; @@ -74,10 +80,11 @@ warn $ob->name, " map reset after logout, logout age $age (>= $MAX_DISCONNECT_TIME)\n";#d# - # for now, just go back to savebed ($map, $x, $y) = $pl->savebed; - if ($age >= $MAX_DISCONNECT_TIME) { + if (safe_spot $m, $x, $y) { + # do nothing, this is simply ok without a special scary message + } elsif ($age >= $MAX_DISCONNECT_TIME) { $ob->message ( "You didn't use a bed to reality to leave this realm, leaving your body in great danger. " . "Unfortunately, nobody was near to help you when the monsters arrived to eat you. " @@ -98,6 +105,8 @@ cf::NDI_RED ); } + } elsif (safe_spot $m, $x, $y) { + # do nothing, this is simply ok without a special scary message } else { $ob->message ( "You didn't use a bed to reality to leave this realm. This is very dangerous, "