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.214 by root, Tue Dec 22 00:35:44 2009 UTC vs.
Revision 1.218 by root, Thu Apr 8 19:11:21 2010 UTC

1package DC::Protocol; 1package DC::Protocol;
2 2
3use utf8; 3use common::sense;
4use strict;
5 4
6use Guard (); 5use Guard ();
7 6
8use Deliantra::Protocol::Constants; 7use Deliantra::Protocol::Constants;
9 8
539 $::STATWIDS->{st_spd} ->set_text (sprintf "%.1f", $stats->{+CS_STAT_SPEED}); 538 $::STATWIDS->{st_spd} ->set_text (sprintf "%.1f", $stats->{+CS_STAT_SPEED});
540 $::STATWIDS->{st_wspd}->set_text (sprintf "%.1f", $stats->{+CS_STAT_WEAP_SP}); 539 $::STATWIDS->{st_wspd}->set_text (sprintf "%.1f", $stats->{+CS_STAT_WEAP_SP});
541 540
542 $self->update_weight; 541 $self->update_weight;
543 542
544 $::STATWIDS->{"res_$_"}->set_text (sprintf "%d%", $stats->{$RES_TBL{$_}}) 543 $::STATWIDS->{"res_$_"}->set_text (sprintf "%d%%", $stats->{$RES_TBL{$_}})
545 for keys %RES_TBL; 544 for keys %RES_TBL;
546 545
547 my $sktbl = $::STATWIDS->{skill_tbl}; 546 my $sktbl = $::STATWIDS->{skill_tbl};
548 my @skills = keys %{ $self->{skill_info} }; 547 my @skills = keys %{ $self->{skill_info} };
549 548
1348sub update_server_info { 1347sub update_server_info {
1349 my ($self) = @_; 1348 my ($self) = @_;
1350 1349
1351 my @yesno = ("<span foreground='red'>no</span>", "<span foreground='green'>yes</span>"); 1350 my @yesno = ("<span foreground='red'>no</span>", "<span foreground='green'>yes</span>");
1352 1351
1352 my $version = JSON::XS->new->encode ($self->{s_version});
1353
1353 $::SERVER_INFO->set_markup ( 1354 $::SERVER_INFO->set_markup (
1354 "server <tt>$self->{host}:$self->{port}</tt>\n" 1355 "server <tt>$self->{host}:$self->{port}</tt>\n"
1355 . "protocol version <tt>$self->{version}</tt>\n" 1356 . "protocol version <tt>$version</tt>\n"
1356 . "minimap support $yesno[$self->{setup}{mapinfocmd} > 0]\n" 1357 . "minimap support $yesno[$self->{setup}{mapinfocmd} > 0]\n"
1357 . "extended command support $yesno[$self->{setup}{extcmd} > 0]\n" 1358 . "extended command support $yesno[$self->{setup}{extcmd} > 0]\n"
1358 . "examine command support $yesno[$self->{setup}{excmd} > 0]\n" 1359 . "examine command support $yesno[$self->{setup}{excmd} > 0]\n"
1359 . "editing support $yesno[!!$self->{editor_support}]\n" 1360 . "editing support $yesno[!!$self->{editor_support}]\n"
1360 . "map attributes $yesno[$self->{setup}{extmap} > 0]\n" 1361 . "map attributes $yesno[$self->{setup}{extmap} > 0]\n"
1389 1390
1390 $self->update_server_info; 1391 $self->update_server_info;
1391 1392
1392 $self->send_command ("output-rate $::CFG->{output_rate}") if $::CFG->{output_rate} > 0; 1393 $self->send_command ("output-rate $::CFG->{output_rate}") if $::CFG->{output_rate} > 0;
1393 $self->send_pickup ($::CFG->{pickup}); 1394 $self->send_pickup ($::CFG->{pickup});
1394
1395 $self->send_exti_msg (clientlog => sprintf "OpenGL Info: %s [%s]",
1396 DC::OpenGL::gl_vendor, DC::OpenGL::gl_version);#d#
1397} 1395}
1398 1396
1399sub lookat { 1397sub lookat {
1400 my ($self, $x, $y) = @_; 1398 my ($self, $x, $y) = @_;
1401 1399

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines