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.68 by root, Sun Jul 22 17:10:06 2007 UTC vs.
Revision 1.69 by root, Mon Jul 23 17:53:55 2007 UTC

477 }, 477 },
478); 478);
479 479
480############################################################################# 480#############################################################################
481 481
482our $SCHEDULE_INTERVAL = 10; # time the player scheduler sleeps between runs 482our $SCHEDULE_INTERVAL = $cf::CFG{player_schedule_interval} || 10; # time the player scheduler sleeps between runs
483our $SAVE_TIMEOUT = 20; # save players every n seconds 483our $SAVE_TIMEOUT = $cf::CFG{player_save_interval} || 20; # save players every n seconds
484 484
485our $SCHEDULER = cf::async_ext { 485our $SCHEDULER = cf::async_ext {
486 my $schedule_interval = Coro::Event->timer (after => 1); 486 my $schedule_interval = Coro::Event->timer (after => 1);
487 while () { 487 while () {
488 $schedule_interval->interval ($SCHEDULE_INTERVAL); 488 $schedule_interval->interval ($SCHEDULE_INTERVAL);
498 or next; 498 or next;
499 $pl->valid or next; 499 $pl->valid or next;
500 500
501 eval { 501 eval {
502 if ($pl->{last_save} + $SAVE_TIMEOUT <= $cf::RUNTIME) { 502 if ($pl->{last_save} + $SAVE_TIMEOUT <= $cf::RUNTIME) {
503 cf::wait_for_tick_begin;
504 $pl->save; 503 $pl->save;
505 504
506 unless ($pl->active || $pl->ns) { 505 unless ($pl->active || $pl->ns) {
507 # check refcounts, this is tricky and needs to be adjusted to fit server internals 506 # check refcounts, this is tricky and needs to be adjusted to fit server internals
508 my $ob = $pl->ob; 507 my $ob = $pl->ob;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines