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

Comparing deliantra/server/ext/map-prefetch.ext (file contents):
Revision 1.1 by root, Fri Dec 15 19:29:18 2006 UTC vs.
Revision 1.2 by root, Thu Dec 21 22:41:34 2006 UTC

106 106
107 my $exit = $MAP_EXITS{$map->path} ||= find_exits $map; 107 my $exit = $MAP_EXITS{$map->path} ||= find_exits $map;
108 prefetch map => $_ for @$exit; 108 prefetch map => $_ for @$exit;
109} 109}
110 110
111cf::attach_to_players prio => -900, 111cf::player->attach (
112 prio => -900,
112 on_map_change => sub { 113 on_map_change => sub {
113 my ($pl, $new, $x, $x) = @_; 114 my ($pl, $new, $x, $x) = @_;
114 115
115 prefetch_map $new; 116 prefetch_map $new;
116 }, 117 },
117; 118);
118 119
119if (0) { #test# 120if (0) { #test#
120# prefetch a few players/second 121# prefetch a few players/second
121{ 122{
122 my @players; 123 my @players;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines