--- deliantra/maps/perl/map-prefetch.ext 2006/08/03 11:23:58 1.10 +++ deliantra/maps/perl/map-prefetch.ext 2006/08/25 13:24:05 1.11 @@ -112,11 +112,13 @@ prefetch map => $_ for @$exit; } -sub on_mapenter { - my ($ob) = @_; +cf::attach_to_players prio => -900, + on_enter => sub { + my ($pl) = @_; - prefetch_map $ob->map; -} + prefetch_map $pl->ob->map; + }, +; if (0) { #test# # prefetch a few players/second