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

Comparing deliantra/server/ext/item-worldmap.ext (file contents):
Revision 1.20 by root, Tue Sep 23 04:29:11 2008 UTC vs.
Revision 1.23 by root, Fri Feb 3 03:01:44 2012 UTC

1#! perl # depends=widget mandatory 1#! perl # depends=widget mandatory
2 2
3# this module implements a rather fancy worldmap 3# this module implements a rather fancy worldmap
4 4
5our $WORLDMAP_UPDATE_INTERVAL = $cf::CFG{worldmap_update_interval} || 2; 5CONF WORLDMAP_UPDATE_INTERVAL = 2;
6 6
7our $GENCOUNT = 0; 7our $GENCOUNT = 0;
8our %PLAYERINFO; 8our %PLAYERINFO;
9 9
10our ($MAPW, $MAPH) = (1024, 1024); # it's useful to know the map width/height in pixels 10our ($MAPW, $MAPH) = (1024, 1024); # it's useful to know the map width/height in pixels
105 cf::override 1; 105 cf::override 1;
106 }, 106 },
107; 107;
108 108
109cf::post_init { 109cf::post_init {
110 cf::async_ext { 110 our $UPDATER = cf::async_ext {
111 $Coro::current->{desc} = "worldmap updater"; 111 $Coro::current->{desc} = "worldmap updater";
112 112
113 while () { 113 while () {
114 Coro::EV::timer_once $WORLDMAP_UPDATE_INTERVAL; 114 Coro::AnyEvent::sleep $WORLDMAP_UPDATE_INTERVAL;
115 115
116 cf::get_slot 0.01, -50, "worldmap update"; 116 cf::get_slot 0.01, -50, "worldmap update";
117 117
118 ++$GENCOUNT; 118 ++$GENCOUNT;
119 119

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines