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.152 by root, Mon Aug 13 14:15:09 2007 UTC vs.
Revision 1.154 by elmex, Tue Aug 14 13:25:25 2007 UTC

552 my $map_info = delete $self->{map_info} 552 my $map_info = delete $self->{map_info}
553 or return; 553 or return;
554 554
555 my ($hash, $x, $y, $w, $h) = @$map_info; 555 my ($hash, $x, $y, $w, $h) = @$map_info;
556 556
557 my $data = $self->{map}->get_rect ($x, $y, $w, $h); 557 my $data = Compress::LZF::compress $self->{map}->get_rect ($x, $y, $w, $h);
558 $self->{map_cache_new}{$hash} = \$data;
558 CFPlus::DB::put $self->{mapcache} => $hash => Compress::LZF::compress $data, sub { }; 559 CFPlus::DB::put $self->{mapcache} => $hash => $data, sub { };
559 #warn sprintf "SAVEmap[%s] length %d\n", $hash, length $data;#d#
560} 560}
561 561
562sub map_clear { 562sub map_clear {
563 my ($self) = @_; 563 my ($self) = @_;
564 564
913 $self->{$type} = $text; 913 $self->{$type} = $text;
914 } else { 914 } else {
915 $self->logprint ("msg: ", $text); 915 $self->logprint ("msg: ", $text);
916 return if $color < 0; # negative color == ignore if not understood 916 return if $color < 0; # negative color == ignore if not understood
917 917
918 my $fg = $CF_COLOR[$color & 0x1f] || [1, 0, 0]; 918 my $fg = $CF_COLOR[$color & NDI_COLOR_MASK] || [1, 0, 0];
919 919
920 ## try to create single paragraphs of multiple lines sent by the server 920 ## try to create single paragraphs of multiple lines sent by the server
921 # no longer neecssary with TRT servers 921 # no longer neecssary with TRT servers
922 #$text =~ s/(?<=\S)\n(?=\w)/ /g; 922 #$text =~ s/(?<=\S)\n(?=\w)/ /g;
923 923
924 ::message ({ fg => $fg, markup => $_, type => $type, extra => [@extra] }) 924 ::message ({
925 fg => $fg,
926 markup => $_,
927 type => $type,
928 extra => [@extra],
929 color_flags => $color
925 for split /\n/, $text; 930 }) for split /\n/, $text;
926 931
927 $self->{statusbox}->add ($text, 932 $self->{statusbox}->add ($text,
928 group => $text, 933 group => $text,
929 fg => $fg, 934 fg => $fg,
930 timeout => $color >= 2 ? 180 : 10, 935 timeout => $color >= 2 ? 180 : 10,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines