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.120 by root, Sat Jul 14 13:04:42 2007 UTC vs.
Revision 1.122 by root, Sun Jul 15 22:07:48 2007 UTC

74 74
75 if (defined $meta_json) { 75 if (defined $meta_json) {
76 my $meta = $self->{json_coder}->decode ($meta_json); 76 my $meta = $self->{json_coder}->decode ($meta_json);
77 $meta->{path} = $path; 77 $meta->{path} = $path;
78 $self->{music_meta}{$chksum} = $meta; 78 $self->{music_meta}{$chksum} = $meta;
79 &::audio_music_set ($self->{songs});
79 } else { 80 } else {
80 ::message ({ markup => "starting to download song #$face/$pri, check your output-rate setting if your connection gets laggy." }); 81 ::message ({ markup => "starting to download song #$face/$pri, check your output-rate setting if your connection gets laggy." });
81 $self->ask_face ($face, -100 - $pri, undef, sub { 82 $self->ask_face ($face, -100 - $pri, undef, sub {
82 my $len = length $_[1]; 83 my $len = length $_[1];
83 my ($meta_json, $data) = unpack "(w/a*)*", $_[1]; 84 my ($meta_json, $data) = unpack "(w/a*)*", $_[1];
773 new_from_image CFPlus::Texture 774 new_from_image CFPlus::Texture
774 $data, minify => 1, mipmap => 1; 775 $data, minify => 1, mipmap => 1;
775 776
776 $self->{map}->set_texture ($id, @$tex{qw(name w h s t)}, @{$tex->{minified}}); 777 $self->{map}->set_texture ($id, @$tex{qw(name w h s t)}, @{$tex->{minified}});
777 $self->{map_widget}->update; 778 $self->{map_widget}->update;
779
780 $_->() for @{(delete $self->{face_cb}{$id}) || []};
781}
782
783sub connect_face_update {
784 my ($self, $id, $cb) = @_;
785
786 push @{$self->{face_cb}{$id}}, $cb;
787
788 CFPlus::guard {
789 @{$self->{face_cb}{$id}}
790 = grep $_ != $cb,
791 @{$self->{face_cb}{$id}};
792 }
778} 793}
779 794
780sub sound_play { 795sub sound_play {
781 my ($self, $x, $y, $soundnum, $type) = @_; 796 my ($self, $x, $y, $soundnum, $type) = @_;
782 797

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines