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.577 by root, Tue Jan 3 11:25:33 2012 UTC vs.
Revision 1.578 by root, Wed Jan 4 02:48:57 2012 UTC

108our $RANDOMDIR = "$LOCALDIR/random"; 108our $RANDOMDIR = "$LOCALDIR/random";
109our $BDBDIR = "$LOCALDIR/db"; 109our $BDBDIR = "$LOCALDIR/db";
110our $PIDFILE = "$LOCALDIR/pid"; 110our $PIDFILE = "$LOCALDIR/pid";
111our $RUNTIMEFILE = "$LOCALDIR/runtime"; 111our $RUNTIMEFILE = "$LOCALDIR/runtime";
112 112
113our %RESOURCE; # unused 113#our %RESOURCE; # unused
114 114
115our $OUTPUT_RATE_MIN = 3000; 115our $OUTPUT_RATE_MIN = 3000;
116our $OUTPUT_RATE_MAX = 1000000; 116our $OUTPUT_RATE_MAX = 1000000;
117 117
118our $MAX_LINKS = 32; # how many chained exits to follow 118our $MAX_LINKS = 32; # how many chained exits to follow
3514 3514
3515 { 3515 {
3516 my $res = $facedata->{resource}; 3516 my $res = $facedata->{resource};
3517 3517
3518 while (my ($name, $info) = each %$res) { 3518 while (my ($name, $info) = each %$res) {
3519 if (defined $info->{type}) { 3519 if (defined (my $type = delete $info->{type})) {
3520 # TODO: different hash - must free and use new index, or cache ixface data queue
3520 my $idx = (cf::face::find $name) || cf::face::alloc $name; 3521 my $idx = (cf::face::find $name) || cf::face::alloc $name;
3521 3522
3522 cf::face::set_data $idx, 0, $info->{data}, $info->{hash}; 3523 cf::face::set_data $idx, 0, delete $info->{data}, delete $info->{hash};
3523 cf::face::set_type $idx, $info->{type}; 3524 cf::face::set_type $idx, $type;
3525 cf::face::set_meta $idx, (keys %$info && (~$type & 1)) ? $info : undef; # any keys left are stashed into meta unless prepended
3524 } else { 3526 } else {
3525 $RESOURCE{$name} = $info; # unused 3527# $RESOURCE{$name} = $info; # unused
3526 } 3528 }
3527 3529
3528 cf::cede_to_tick; 3530 cf::cede_to_tick;
3529 } 3531 }
3530 } 3532 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines