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.323 by root, Sat Jul 28 12:02:58 2007 UTC vs.
Revision 1.328 by root, Wed Aug 8 06:24:30 2007 UTC

1921 $self->set_darkness_map; 1921 $self->set_darkness_map;
1922 Coro::cede; 1922 Coro::cede;
1923 $self->activate; 1923 $self->activate;
1924 } 1924 }
1925 1925
1926 $self->{last_save} = $cf::RUNTIME;
1927 $self->last_access ($cf::RUNTIME);
1928
1926 $self->in_memory (cf::MAP_IN_MEMORY); 1929 $self->in_memory (cf::MAP_IN_MEMORY);
1927 } 1930 }
1928 1931
1929 $self->post_load; 1932 $self->post_load;
1930} 1933}
2547 || s/<fg name=\"([^"]+)\">([^<]*)<\/fg>/[color=$1]${2}[\/color]/; 2550 || s/<fg name=\"([^"]+)\">([^<]*)<\/fg>/[color=$1]${2}[\/color]/;
2548 } 2551 }
2549 2552
2550 $color &= cf::NDI_COLOR_MASK; 2553 $color &= cf::NDI_COLOR_MASK;
2551 2554
2555 utf8::encode $msg;
2556
2552 if (0 && $msg =~ /\[/) { 2557 if (0 && $msg =~ /\[/) {
2553 $self->send_packet ("drawextinfo $color 4 0 $msg") 2558 $self->send_packet ("drawextinfo $color 4 0 $msg")
2554 } else { 2559 } else {
2555 $msg =~ s/\[\/?(?:b|i|u|fixed|color)[^\]]*\]//g; 2560 $msg =~ s/\[\/?(?:b|i|u|fixed|color)[^\]]*\]//g;
2556 $self->send_packet ("drawinfo $color $msg") 2561 $self->send_packet ("drawinfo $color $msg")
2705our $safe = new Safe "safe"; 2710our $safe = new Safe "safe";
2706our $safe_hole = new Safe::Hole; 2711our $safe_hole = new Safe::Hole;
2707 2712
2708$SIG{FPE} = 'IGNORE'; 2713$SIG{FPE} = 'IGNORE';
2709 2714
2710$safe->permit_only (Opcode::opset qw(:base_core :base_mem :base_orig :base_math sort time)); 2715$safe->permit_only (Opcode::opset qw(
2716 :base_core :base_mem :base_orig :base_math
2717 grepstart grepwhile mapstart mapwhile
2718 sort time
2719));
2711 2720
2712# here we export the classes and methods available to script code 2721# here we export the classes and methods available to script code
2713 2722
2714=pod 2723=pod
2715 2724
2730 2739
2731=cut 2740=cut
2732 2741
2733for ( 2742for (
2734 ["cf::object" => qw(contr pay_amount pay_player map force_find force_add x y 2743 ["cf::object" => qw(contr pay_amount pay_player map force_find force_add x y
2735 insert remove)], 2744 insert remove inv)],
2736 ["cf::object::player" => qw(player)], 2745 ["cf::object::player" => qw(player)],
2737 ["cf::player" => qw(peaceful)], 2746 ["cf::player" => qw(peaceful)],
2738 ["cf::map" => qw(trigger)], 2747 ["cf::map" => qw(trigger)],
2739) { 2748) {
2740 no strict 'refs'; 2749 no strict 'refs';
2906 for (0 .. SOUND_CAST_SPELL_0 - 1) { 2915 for (0 .. SOUND_CAST_SPELL_0 - 1) {
2907 my $sound = $soundconf->{compat}[$_] 2916 my $sound = $soundconf->{compat}[$_]
2908 or next; 2917 or next;
2909 2918
2910 my $face = cf::face::find "sound/$sound->[1]"; 2919 my $face = cf::face::find "sound/$sound->[1]";
2911
2912 cf::sound::set $sound->[0] => $face; 2920 cf::sound::set $sound->[0] => $face;
2913 cf::sound::old_sound_index $_, $face; # gcfclient-compat 2921 cf::sound::old_sound_index $_, $face; # gcfclient-compat
2914 } 2922 }
2915 2923
2924 while (my ($k, $v) = each %{$soundconf->{event}}) {
2925 my $face = cf::face::find "sound/$v";
2926 cf::sound::set $k => $face;
2916 #TODO 2927 }
2917 } 2928 }
2918 } 2929 }
2919 2930
2920 1 2931 1
2921} 2932}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines