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.80 by root, Sun Jan 13 12:27:12 2008 UTC vs.
Revision 1.84 by root, Wed Apr 30 06:40:28 2008 UTC

92 # the map was reset in the meantime 92 # the map was reset in the meantime
93 my $age = $cf::RUNTIME - $time; 93 my $age = $cf::RUNTIME - $time;
94 94
95 warn $ob->name, " map reset after logout, logout age $age (>= $MAX_DISCONNECT_TIME)\n";#d# 95 warn $ob->name, " map reset after logout, logout age $age (>= $MAX_DISCONNECT_TIME)\n";#d#
96 96
97 ($map, $x, $y) = $pl->savebed;
98
99 if ($age >= $MAX_DISCONNECT_TIME) { 97 if ($age >= $MAX_DISCONNECT_TIME) {
100 $ob->message ( 98 $ob->message (
101 "You didn't use a bed to reality to leave this realm, leaving your body in great danger. " 99 "You didn't use a bed to reality to leave this realm, leaving your body in great danger. "
102 . "Unfortunately, nobody was near to help you when the monsters arrived to eat you. " 100 . "Unfortunately, nobody was near to help you when the monsters arrived to eat you. "
103 . "Maybe you can find comfort in the thought that your body was quite satisfying in taste... " 101 . "Maybe you can find comfort in the thought that your body was quite satisfying in taste... "
105 cf::NDI_RED 103 cf::NDI_RED
106 ); 104 );
107 # kill them. 105 # kill them.
108 # reminds me of the famous badness 10000 syndrome... 106 # reminds me of the famous badness 10000 syndrome...
109 $ob->stats->hp (-10000); #] if they survive this they deserved to live 107 $ob->stats->hp (-10000); #] if they survive this they deserved to live
108 my $killer = cf::arch::get "killer_login";
110 $pl->killer ("a cave-in"); 109 $pl->killer ($killer);
110 $killer->destroy;
111 } else { 111 } else {
112 ($map, $x, $y) = $pl->savebed;
113
112 $ob->message ( 114 $ob->message (
113 "You didn't use a bed to reality to leave this realm, leaving your body in great danger. " 115 "You didn't use a bed to reality to leave this realm, leaving your body in great danger. "
114 . "Fortunately, some friendly dwellers found you, checked your passport, and brought you to safety. " 116 . "Fortunately, some friendly dwellers found you, checked your passport, and brought you to safety. "
115 . "Better use a savebed next time, much worse things could have happened... " 117 . "Better use a savebed next time, much worse things could have happened... "
116 . "H<You disconnected without having used a savebed. When you do that for too long, you might die.>", 118 . "H<You disconnected without having used a savebed. When you do that for too long, you might die.>",
465 467
466 # update respawn position 468 # update respawn position
467 $pl->savebed ($bed->map->path, $bed->x, $bed->y); 469 $pl->savebed ($bed->map->path, $bed->x, $bed->y);
468 cf::async { $pl->save }; 470 cf::async { $pl->save };
469 471
472 my $killer = cf::arch::get "killer_logout";
470 $pl->killer ("left"); 473 $pl->killer ($killer);
474 $killer->destroy;
471 $ob->check_score; 475 $ob->check_score;
472 476
473 $ob->reply (undef, "In the future, you will wake up here when you die."); 477 $ob->reply (undef, "In the future, you will wake up here when you die.");
474 478
475 $pl->ns->query (cf::CS_QUERY_SINGLECHAR, "Do you want to continue playing (y/n)?", sub { 479 $pl->ns->query (cf::CS_QUERY_SINGLECHAR, "Do you want to continue playing (y/n)?", sub {
549 $pl->destroy; # destroys $ob 553 $pl->destroy; # destroys $ob
550 } else { 554 } else {
551 my $a_ = $pl->refcnt;#d# 555 my $a_ = $pl->refcnt;#d#
552 my $b_ = $ob->refcnt;#d# 556 my $b_ = $ob->refcnt;#d#
553 557
554 warn "player-scheduler refcnt ", $ob->name, " pl $pl_ref ob $ob_ref (C pl $a_ ob $b_)\n";#d# 558 warn "player-scheduler refcnt ", $ob->name, " pl $pl_ref/3 ob $ob_ref/3 (C pl $a_/1 ob $b_/2)\n";#d#
555 } 559 }
556 } 560 }
557 } 561 }
558 }; 562 };
559 warn $@ if $@; 563 warn $@ if $@;
560 Coro::cede; 564 cf::cede_to_tick;
561 }; 565 };
562 } 566 }
563}; 567};
564 568
565$SCHEDULER->prio (1); 569$SCHEDULER->prio (1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines