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.49 by root, Fri Oct 23 03:08:34 2009 UTC vs.
Revision 1.51 by root, Fri Dec 18 03:49:46 2009 UTC

63 } else { 63 } else {
64 Coro::EV::timer_once $SCHEDULE_INTERVAL; 64 Coro::EV::timer_once $SCHEDULE_INTERVAL;
65 } 65 }
66 66
67 # this weird form of iteration over values is used because 67 # this weird form of iteration over values is used because
68 # the hash changes underneath us frequently, and for 68 # the hash changes underneath us frequently, and 'for'
69 # keeps a direct reference to the value without (in 5.8 perls) 69 # keeps a direct reference to the value without (in 5.8 perls)
70 # keeping a reference, so this is prone to crashes or worse. 70 # keeping a reference, so this is prone to crashes or worse.
71 my @maps = keys %cf::MAP; 71 my @maps = keys %cf::MAP;
72 for (@maps) { 72 for (@maps) {
73 my $map = $cf::MAP{$_} 73 my $map = $cf::MAP{$_}
104 $SCHEDULER->prio (-2); 104 $SCHEDULER->prio (-2);
105}; 105};
106 106
107# purely for debugging, will load ALL maps 107# purely for debugging, will load ALL maps
108sub loadall { 108sub loadall {
109 my $maps = cf::map::static_maps;
110
111 for my $path (@$maps) {
112 my $map = cf::map::find $path
113 or warn "ERROR: unable to find map $path\n";
114 $map->load;
115 }
109} 116}
110 117
111 118

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines