--- deliantra/server/ext/map-world.ext 2008/09/23 04:29:11 1.34 +++ 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::post_init { +{ 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)$}