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

Comparing deliantra/server/ext/map-world.ext (file contents):
Revision 1.30 by root, Tue Sep 11 13:27:54 2007 UTC vs.
Revision 1.32 by root, Wed Dec 5 11:08:34 2007 UTC

65 "$path/gridmap.regn.png", 65 "$path/gridmap.regn.png",
66 ], 66 ],
67 1 => sub { 67 1 => sub {
68 my ($src) = @_; 68 my ($src) = @_;
69 69
70 my $map = cf::from_json $src->[0]; 70 my $map = cf::decode_json $src->[0];
71 71
72 my $size = $map->{tile_w} * $map->{tile_h} * $map->{grid_w} * $map->{grid_h} 72 my $size = $map->{tile_w} * $map->{tile_h} * $map->{grid_w} * $map->{grid_h}
73 or cf::cleanup "$path/gridmap.meta: empty gridmap?"; 73 or cf::cleanup "$path/gridmap.meta: empty gridmap?";
74 74
75 ($map->{arc_data}, $map->{arc_plt}) = load_indexed "$path/gridmap.arch", $size; 75 ($map->{arc_data}, $map->{arc_plt}) = load_indexed "$path/gridmap.arch", $size;
88 88
89# this is contorted, but likely the correct way to acquire the lock :) 89# this is contorted, but likely the correct way to acquire the lock :)
90cf::sync_job { 90cf::sync_job {
91 my $guard = cf::lock_acquire "ext::world_gridmap"; 91 my $guard = cf::lock_acquire "ext::world_gridmap";
92 cf::async_ext { 92 cf::async_ext {
93 $Coro::current->{desc} = "worldmap loader";
93 reload; 94 reload;
94 undef $guard; 95 undef $guard;
95 }; 96 };
96}; 97};
97 98

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines