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.228 by root, Mon Mar 26 16:53:33 2007 UTC vs.
Revision 1.229 by root, Sun Apr 1 00:36:34 2007 UTC

2258} 2258}
2259 2259
2260############################################################################# 2260#############################################################################
2261# the server's init and main functions 2261# the server's init and main functions
2262 2262
2263sub load_faces { 2263sub load_facedata {
2264 my $path = sprintf "%s/faces", cf::datadir; 2264 my $path = sprintf "%s/facedata", cf::datadir;
2265 2265
2266 warn "loading faces from $path\n"; 2266 warn "loading facedata from $path\n";
2267 2267
2268 my $faces; 2268 my $faces;
2269 0 < aio_load $path, $faces 2269 0 < aio_load $path, $faces
2270 or die "$path: $!"; 2270 or die "$path: $!";
2271 2271
2279 2279
2280 while (my ($face, $info) = each %$faces) { 2280 while (my ($face, $info) = each %$faces) {
2281 my $idx = (cf::face::find $face) || cf::face::alloc $face; 2281 my $idx = (cf::face::find $face) || cf::face::alloc $face;
2282 cf::face::set $idx, $info->{visibility}, $info->{magicmap}; 2282 cf::face::set $idx, $info->{visibility}, $info->{magicmap};
2283 cf::face::set_data $idx, 0, $info->{data32}, $info->{chksum32}; 2283 cf::face::set_data $idx, 0, $info->{data32}, $info->{chksum32};
2284 cf::face::set_data $idx, 1, $info->{data64}, $info->{chksum64};
2284 Coro::cede; 2285 Coro::cede;
2285 } 2286 }
2286 2287
2287 while (my ($face, $info) = each %$faces) { 2288 while (my ($face, $info) = each %$faces) {
2288 next unless $info->{smooth}; 2289 next unless $info->{smooth};
2300} 2301}
2301 2302
2302sub reload_resources { 2303sub reload_resources {
2303 load_resource_file sprintf "%s/%s/regions", cf::datadir, cf::mapdir 2304 load_resource_file sprintf "%s/%s/regions", cf::datadir, cf::mapdir
2304 or die "unable to load regions file\n";#d# 2305 or die "unable to load regions file\n";#d#
2305 load_faces 2306 load_facedata
2306 or die "unable to load faces\n";#d# 2307 or die "unable to load facedata\n";#d#
2307} 2308}
2308 2309
2309sub init { 2310sub init {
2310 reload_resources; 2311 reload_resources;
2311} 2312}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines