--- deliantra/server/ext/map-world.ext 2007/12/05 11:08:34 1.32 +++ deliantra/server/ext/map-world.ext 2008/09/23 05:01:41 1.35 @@ -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)$} @@ -147,7 +149,7 @@ } else { $self->alloc; $self->fill; - $self->in_memory (cf::MAP_IN_MEMORY); + $self->in_memory (cf::MAP_ACTIVE); $self->activate; } }