--- deliantra/Deliantra-Client/DC/Protocol.pm 2007/07/24 18:39:39 1.133 +++ deliantra/Deliantra-Client/DC/Protocol.pm 2007/07/28 00:45:28 1.137 @@ -60,6 +60,8 @@ $self->connect_ext (capabilities => sub { my (%cap) = @_; + #$self->send ("setup sound 0"); # we use a different protocol + $self->send_exti_msg (fx_want => { 3 => !!$::CFG->{bgm_enable}, # FT_MUSIC 5 => !!$::CFG->{audio_enable}, # FT_SOUND @@ -189,7 +191,9 @@ # message window $self->connect_ext (channel_info => sub { - $::MESSAGE_WINDOW->add_channel ($_[0]); + my ($info) = @_; + $self->{channels}->{$info->{id}} = $info; + $::MESSAGE_WINDOW->add_channel ($info); }); # destroy widgets on logout @@ -814,8 +818,9 @@ sub sound_play { my ($self, $x, $y, $soundnum, $type) = @_; + warn "sound play <@_>\n";#d# - $self->{sound_play}->($x, $y, $soundnum, $type); + #$self->{sound_play}->($x, $y, $soundnum, $type); } my $LAST_QUERY; # server is stupid, stupid, stupid @@ -896,7 +901,7 @@ # no longer neecssary with TRT servers #$text =~ s/(?<=\S)\n(?=\w)/ /g; - ::message ({ fg => $fg, markup => $_, type => $type }) + ::message ({ fg => $fg, markup => $_, type => $type, extra => [@extra] }) for split /\n/, $text; $self->{statusbox}->add ($text, @@ -1162,7 +1167,6 @@ . "map size $self->{mapw}×$self->{maph}\n" ); - ::setup_build_button ($self->{editor_support}->{builder_ui}); } sub logged_in { @@ -1194,14 +1198,6 @@ $self->send_command ("pickup $::CFG->{pickup}"); } -sub buildat { - my ($self, $builditem, $x, $y) = @_; - - if ($self->{cfplus_ext}) { - $self->send_ext_msg (builder_build => dx => $x, dy => $y, (ref ($builditem) eq 'HASH') ? %$builditem : (item => $builditem)); - } -} - sub lookat { my ($self, $x, $y) = @_;