Deliantra-Client

 view release on metacpan or  search on metacpan

DC/Protocol.pm  view on Meta::CPAN


   return unless $self->{map_info};

   for my $map_info (values %{ $self->{map_cache} || {} }) {
      my ($hash, $rdata, $x, $y, $w, $h) = @$map_info;

      my $data = $self->{map}->get_rect ($x, $y, $w, $h);

      if ($data ne $$rdata) {
         $map_info->[1] = \$data;
         my $cdata = Compress::LZF::compress $data;
         DC::DB::put $self->{mapcache} => $hash => $cdata, sub { };
      }
   }
}

sub map_clear {
   my ($self) = @_;

   $self->flush_map;
   delete $self->{map_info};
   delete $self->{neigh_map};



( run in 0.662 second using v1.01-cache-2.11-cpan-454fe037f31 )