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

Comparing deliantra/maps/perl/map-prefetch.ext (file contents):
Revision 1.10 by root, Thu Aug 3 11:23:58 2006 UTC vs.
Revision 1.11 by root, Fri Aug 25 13:24:05 2006 UTC

110 110
111 my $exit = $MAP_EXITS{$map->path} ||= find_exits $map; 111 my $exit = $MAP_EXITS{$map->path} ||= find_exits $map;
112 prefetch map => $_ for @$exit; 112 prefetch map => $_ for @$exit;
113} 113}
114 114
115sub on_mapenter { 115cf::attach_to_players prio => -900,
116 on_enter => sub {
116 my ($ob) = @_; 117 my ($pl) = @_;
117 118
118 prefetch_map $ob->map; 119 prefetch_map $pl->ob->map;
119} 120 },
121;
120 122
121if (0) { #test# 123if (0) { #test#
122# prefetch a few players/second 124# prefetch a few players/second
123{ 125{
124 my @players; 126 my @players;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines