ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.318 by root, Tue Jul 24 04:55:34 2007 UTC vs.
Revision 1.321 by root, Thu Jul 26 21:44:43 2007 UTC

2518 2518
2519 if (ref $channel) { 2519 if (ref $channel) {
2520 # send meta info to client, if not yet sent 2520 # send meta info to client, if not yet sent
2521 unless (exists $self->{channel}{$channel->{id}}) { 2521 unless (exists $self->{channel}{$channel->{id}}) {
2522 $self->{channel}{$channel->{id}} = $channel; 2522 $self->{channel}{$channel->{id}} = $channel;
2523 $self->ext_msg (channel_info => %$channel); 2523 $self->ext_msg (channel_info => $channel);
2524 } 2524 }
2525 2525
2526 $channel = $channel->{id}; 2526 $channel = $channel->{id};
2527 } 2527 }
2528 2528
2865 # TODO: for gcfclient pleasure, we should give resources 2865 # TODO: for gcfclient pleasure, we should give resources
2866 # that gcfclient doesn't grok a >10000 face index. 2866 # that gcfclient doesn't grok a >10000 face index.
2867 my $res = $facedata->{resource}; 2867 my $res = $facedata->{resource};
2868 my $enc = JSON::XS->new->utf8->canonical; 2868 my $enc = JSON::XS->new->utf8->canonical;
2869 2869
2870 my $soundconf = delete $res->{"res/sound.conf"};
2871
2870 while (my ($name, $info) = each %$res) { 2872 while (my ($name, $info) = each %$res) {
2871 my $meta = $enc->encode ({ 2873 my $meta = $enc->encode ({
2872 name => $name, 2874 name => $name,
2873 copyright => $info->{copyright}, #TODO# 2875 %{ $info->{meta} || {} },
2874 }); 2876 });
2875 2877
2876 my $idx = (cf::face::find $name) || cf::face::alloc $name; 2878 my $idx = (cf::face::find $name) || cf::face::alloc $name;
2877 2879
2878 if ($info->{type} & 1) { 2880 if ($info->{type} & 1) {
2887 } 2889 }
2888 2890
2889 cf::face::set_type $idx, $info->{type}; 2891 cf::face::set_type $idx, $info->{type};
2890 2892
2891 cf::cede_to_tick; 2893 cf::cede_to_tick;
2894 }
2895
2896 if ($soundconf) {
2897 $soundconf = $enc->decode (delete $soundconf->{data});
2898
2899 for (0 .. SOUND_CAST_SPELL_0 - 1) {
2900 my $sound = $soundconf->{compat}[$_]
2901 or next;
2902
2903 my $face = cf::face::find "sound/$sound->[1]";
2904 warn "$sound->[0]: $face\n";#d#
2905
2906 cf::sound::set $sound->[0] => $face;
2907 cf::sound::old_sound_index $_, $face; # gcfclient-compat
2908 }
2909
2910 #TODO
2892 } 2911 }
2893 } 2912 }
2894 2913
2895 1 2914 1
2896} 2915}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines