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.339 by root, Fri Aug 24 00:26:10 2007 UTC vs.
Revision 1.342 by root, Sun Aug 26 15:31:02 2007 UTC

1948 1948
1949sub do_load_sync { 1949sub do_load_sync {
1950 my ($map) = @_; 1950 my ($map) = @_;
1951 1951
1952 cf::LOG cf::llevDebug | cf::logBacktrace, "do_load_sync" 1952 cf::LOG cf::llevDebug | cf::logBacktrace, "do_load_sync"
1953 if $Coro::current != $Coro::main; 1953 if $Coro::current == $Coro::main;
1954 1954
1955 cf::sync_job { $map->load }; 1955 cf::sync_job { $map->load };
1956} 1956}
1957 1957
1958our %MAP_PREFETCH; 1958our %MAP_PREFETCH;
1962 my ($path, $origin, $load) = @_; 1962 my ($path, $origin, $load) = @_;
1963 1963
1964 $path = normalise $path, $origin && $origin->{path}; 1964 $path = normalise $path, $origin && $origin->{path};
1965 1965
1966 if (my $map = $cf::MAP{$path}) { 1966 if (my $map = $cf::MAP{$path}) {
1967 return $map if $map->in_memory == cf::MAP_IN_MEMORY; 1967 return $map if !$load || $map->in_memory == cf::MAP_IN_MEMORY;
1968 } 1968 }
1969 1969
1970 $MAP_PREFETCH{$path} |= $load; 1970 $MAP_PREFETCH{$path} |= $load;
1971 1971
1972 $MAP_PREFETCHER ||= cf::async { 1972 $MAP_PREFETCHER ||= cf::async {
2732 2732
2733The following functions and methods are available within a safe environment: 2733The following functions and methods are available within a safe environment:
2734 2734
2735 cf::object 2735 cf::object
2736 contr pay_amount pay_player map x y force_find force_add 2736 contr pay_amount pay_player map x y force_find force_add
2737 insert remove name archname title slaying race 2737 insert remove name archname title slaying race decrease_ob_nr
2738 2738
2739 cf::object::player 2739 cf::object::player
2740 player 2740 player
2741 2741
2742 cf::player 2742 cf::player
2747 2747
2748=cut 2748=cut
2749 2749
2750for ( 2750for (
2751 ["cf::object" => qw(contr pay_amount pay_player map force_find force_add x y 2751 ["cf::object" => qw(contr pay_amount pay_player map force_find force_add x y
2752 insert remove inv name archname title slaying race)], 2752 insert remove inv name archname title slaying race
2753 decrease_ob_nr)],
2753 ["cf::object::player" => qw(player)], 2754 ["cf::object::player" => qw(player)],
2754 ["cf::player" => qw(peaceful)], 2755 ["cf::player" => qw(peaceful)],
2755 ["cf::map" => qw(trigger)], 2756 ["cf::map" => qw(trigger)],
2756) { 2757) {
2757 no strict 'refs'; 2758 no strict 'refs';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines