ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/login.ext
(Generate patch)

Comparing deliantra/server/ext/login.ext (file contents):
Revision 1.76 by root, Fri Dec 28 19:40:22 2007 UTC vs.
Revision 1.77 by root, Fri Dec 28 19:44:34 2007 UTC

70 ? @{delete $ob->{_link_pos}} 70 ? @{delete $ob->{_link_pos}}
71 : ($pl->maplevel, $ob->x, $ob->y); 71 : ($pl->maplevel, $ob->x, $ob->y);
72 72
73 $ob->enter_link; 73 $ob->enter_link;
74 74
75 my $m = cf::map::find $map;
75 if (my $time = delete $pl->{unclean_save}) { 76 my $time = delete $pl->{unclean_save};
76 if (my $m = cf::map::find $map) { 77
78 if ($time && $m && !safe_spot $m, $x, $y) {
77 if ($time < $m->{instantiate_time}) { 79 if ($time < $m->{instantiate_time}) {
78 # the map was reset in the meantime 80 # the map was reset in the meantime
79 my $age = $cf::RUNTIME - $time; 81 my $age = $cf::RUNTIME - $time;
80 82
81 warn $ob->name, " map reset after logout, logout age $age (>= $MAX_DISCONNECT_TIME)\n";#d# 83 warn $ob->name, " map reset after logout, logout age $age (>= $MAX_DISCONNECT_TIME)\n";#d#
82 84
83 ($map, $x, $y) = $pl->savebed; 85 ($map, $x, $y) = $pl->savebed;
84 86
85 if (safe_spot $m, $x, $y) {
86 # do nothing, this is simply ok without a special scary message
87 } elsif ($age >= $MAX_DISCONNECT_TIME) { 87 if ($age >= $MAX_DISCONNECT_TIME) {
88 $ob->message ( 88 $ob->message (
89 "You didn't use a bed to reality to leave this realm, leaving your body in great danger. " 89 "You didn't use a bed to reality to leave this realm, leaving your body in great danger. "
90 . "Unfortunately, nobody was near to help you when the monsters arrived to eat you. " 90 . "Unfortunately, nobody was near to help you when the monsters arrived to eat you. "
91 . "Maybe you can find comfort in the thought that your body was quite satisfying in taste... " 91 . "Maybe you can find comfort in the thought that your body was quite satisfying in taste... "
92 . "H<You disconnected too long without having used a savebed.>", 92 . "H<You disconnected too long without having used a savebed.>",
93 cf::NDI_RED 93 cf::NDI_RED
94 ); 94 );
95 # kill them. 95 # kill them.
96 # reminds me of the famous badness 10000 syndrome... 96 # reminds me of the famous badness 10000 syndrome...
97 $ob->stats->hp (-10000); #] if they survive this they deserved to live 97 $ob->stats->hp (-10000); #] if they survive this they deserved to live
98 $pl->killer ("a cave-in"); 98 $pl->killer ("a cave-in");
99 } else {
100 $ob->message (
101 "You didn't use a bed to reality to leave this realm, leaving your body in great danger. "
102 . "Fortunately, some friendly dwellers found you, checked your passport, and brought you to safety. "
103 . "Better use a savebed next time, much worse things could have happened... "
104 . "H<You disconnected without having used a savebed. When you do that for too long, you might die.>",
105 cf::NDI_RED
106 );
107 }
108 } elsif (safe_spot $m, $x, $y) {
109 # do nothing, this is simply ok without a special scary message
110 } else { 99 } else {
111 $ob->message ( 100 $ob->message (
112 "You didn't use a bed to reality to leave this realm. This is very dangerous, " 101 "You didn't use a bed to reality to leave this realm, leaving your body in great danger. "
113 . "as lots of things could happen when you leave by other means, such as cave-ins, " 102 . "Fortunately, some friendly dwellers found you, checked your passport, and brought you to safety. "
114 . "or monsters suddenly snapping your body. Better use a savebed next time. " 103 . "Better use a savebed next time, much worse things could have happened... "
115 . "H<Always apply a bed of reality to disconnect from the server.>", 104 . "H<You disconnected without having used a savebed. When you do that for too long, you might die.>",
116 cf::NDI_RED 105 cf::NDI_RED
117 ); 106 );
118 } 107 }
108 } else {
109 $ob->message (
110 "You didn't use a bed to reality to leave this realm. This is very dangerous, "
111 . "as lots of things could happen when you leave by other means, such as cave-ins, "
112 . "or monsters suddenly snapping your body. Better use a savebed next time. "
113 . "H<Always apply a bed of reality to disconnect from the server.>",
114 cf::NDI_RED
115 );
119 } 116 }
120 } 117 }
121 118
122 $ob->goto ($map, $x, $y); 119 $ob->goto ($map, $x, $y);
123} 120}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines