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

Comparing deliantra/server/ext/map-scheduler.ext (file contents):
Revision 1.7 by root, Tue Jan 2 21:13:22 2007 UTC vs.
Revision 1.8 by root, Wed Jan 3 03:04:12 2007 UTC

11 11
12our $SCHEDULER = cf::coro { 12our $SCHEDULER = cf::coro {
13 while () { 13 while () {
14 Coro::Timer::sleep $SCHEDULE_INTERVAL; 14 Coro::Timer::sleep $SCHEDULE_INTERVAL;
15 15
16 for my $map (values %cf::MAP) { 16 my @maps = keys %cf::MAP;
17 for (@maps) {
18 my $map = $cf::MAP{$_}
19 or next;
20 $map->valid or next;
17 eval { 21 eval {
18 # not yet, because maps might become visible to players nearby 22 # not yet, because maps might become visible to players nearby
19 # we need to remove the map from %cf::MAP and all tiled map links 23 # we need to remove the map from %cf::MAP and all tiled map links
20# if ($last_access + $DEACTIVATE_TIMEOUT <= $cf::RUNTIME) { 24# if ($last_access + $DEACTIVATE_TIMEOUT <= $cf::RUNTIME) {
21# $map->deactivate; 25# $map->deactivate;
33 } 37 }
34 } 38 }
35 }; 39 };
36 warn $@ if $@; 40 warn $@ if $@;
37 Coro::cede; 41 Coro::cede;
38 } 42 };
39 } 43 }
40}; 44};
41 45
42$SCHEDULER->prio (-2); 46$SCHEDULER->prio (-2);
43 47

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines