--- deliantra/server/ext/map-world.ext 2007/12/05 11:08:34 1.32 +++ deliantra/server/ext/map-world.ext 2008/12/28 06:59:26 1.36 @@ -86,15 +86,17 @@ warn "worldmap gridmap loaded."; } -# this is contorted, but likely the correct way to acquire the lock :) -cf::sync_job { +{ my $guard = cf::lock_acquire "ext::world_gridmap"; - cf::async_ext { - $Coro::current->{desc} = "worldmap loader"; - reload; - undef $guard; + + cf::post_init { + cf::async_ext { + $Coro::current->{desc} = "worldmap loader"; + reload; + undef $guard; + }; }; -}; +} sub wxwy { $_[0]->path =~ m{/world/world_(\d\d\d)_(\d\d\d)$} @@ -135,7 +137,7 @@ sub fill { my ($self) = @_; - $self->add_underlay ("\x00" x ($WORLD->{tile_w} * $WORLD->{tile_h}), 0, $WORLD->{tile_w}, $WORLD->{arc_plt}); + $self->add_underlay ("\x00" x ($WORLD->{tile_w} * $WORLD->{tile_h}), 0, $WORLD->{tile_w}, $WORLD->{arc_plt});#d# $self->default_region (cf::region::find $WORLD->{reg_plt}[0]); } @@ -147,7 +149,7 @@ } else { $self->alloc; $self->fill; - $self->in_memory (cf::MAP_IN_MEMORY); + $self->in_memory (cf::MAP_ACTIVE); $self->activate; } }