ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/player-env.ext
(Generate patch)

Comparing deliantra/server/ext/player-env.ext (file contents):
Revision 1.5 by root, Thu Jul 12 18:56:33 2007 UTC vs.
Revision 1.7 by root, Thu Jul 12 19:36:57 2007 UTC

22 22
23our $MUSIC_SCHEDULER = cf::async_ext { 23our $MUSIC_SCHEDULER = cf::async_ext {
24 while () { 24 while () {
25 for (keys %MUSIC_QUEUE) { 25 for (keys %MUSIC_QUEUE) {
26 delete $MUSIC_QUEUE{$_}; 26 delete $MUSIC_QUEUE{$_};
27 my $pl = cf::player::find_active $_
28 or next;
29 27
28 my $pl = cf::player::find_active $_ or next;
29 $pl->ob->active or next;
30 my $ns = $pl->ns 30 my $ns = $pl->ns or next;
31 or next;
32
33 $ns->extcmd 31 $ns->extcmd or next;
34 or next; 32 my $map = $pl->ob->map or next;
35 33
36 my $faces; 34 my $faces;
37
38 my $map = $pl->ob->map
39 or next;
40 35
41 # 1. update map-specific music info 36 # 1. update map-specific music info
42 unless (exists $map->{music_faces}) { 37 unless (exists $map->{music_faces}) {
43 $map->{music_faces} = parse_facelist "music/", $map->{music}; 38 $map->{music_faces} = parse_facelist "music/", $map->{music};
44 } 39 }
72 or next; 67 or next;
73 68
74 $ns->{current_music_faces} = $facestr; 69 $ns->{current_music_faces} = $facestr;
75 70
76 my $msg = { 71 my $msg = {
77 faces => $faces, 72 play => $faces,
78 }; 73 };
79 74
80 $msg->{chksum}{$_} = cf::face::get_chksum $_ 75 my $pri = 0;
76 push @{$msg->{faces}}, [$_, $pri++, cf::face::get_chksum $_]
81 for grep $ns->must_send_face ($_), @$faces; 77 for grep $ns->must_send_face ($_), @$faces;
82 78
83 $ns->ext_event (music => %$msg); 79 $ns->ext_event (music => %$msg);
84 80
85 cf::cede_to_tick; 81 cf::cede_to_tick;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines