ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Protocol.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Protocol.pm (file contents):
Revision 1.197 by root, Tue May 20 02:47:21 2008 UTC vs.
Revision 1.198 by root, Tue May 20 02:49:56 2008 UTC

694 my $data = $self->{map}->get_rect ($x, $y, $w, $h); 694 my $data = $self->{map}->get_rect ($x, $y, $w, $h);
695 695
696 if ($data ne $$rdata) { 696 if ($data ne $$rdata) {
697 $map_info->[1] = \$data; 697 $map_info->[1] = \$data;
698 my $cdata = Compress::LZF::compress $data; 698 my $cdata = Compress::LZF::compress $data;
699 warn "db_put $hash $x $y ", length $data, " > ", length $cdata;
700 DC::DB::put $self->{mapcache} => $hash => $cdata, sub { }; 699 DC::DB::put $self->{mapcache} => $hash => $cdata, sub { };
701 } 700 }
702 } 701 }
703} 702}
704 703
742 741
743 my $map_info = $self->{map_cache}{$hash} = [$hash, \"", $x, $y, $w, $h]; 742 my $map_info = $self->{map_cache}{$hash} = [$hash, \"", $x, $y, $w, $h];
744 743
745 my $cb = sub { 744 my $cb = sub {
746 $map_info->[1] = \$_[0]; 745 $map_info->[1] = \$_[0];
747
748 return if 2505 == length $_[0];#d#
749 warn "map_cache $hash $x $y $w $h ", length $_[0];#d#
750 746
751 my $inprogress = @{ $self->{bg_fetch} || [] }; 747 my $inprogress = @{ $self->{bg_fetch} || [] };
752 unshift @{ $self->{bg_fetch} }, $self->{map}->set_rect ($x, $y, $_[0]); 748 unshift @{ $self->{bg_fetch} }, $self->{map}->set_rect ($x, $y, $_[0]);
753 $self->bg_fetch unless $inprogress; 749 $self->bg_fetch unless $inprogress;
754 }; 750 };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines