ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/utils/cfutil.in
(Generate patch)

Comparing deliantra/server/utils/cfutil.in (file contents):
Revision 1.13 by root, Mon Mar 12 17:33:12 2007 UTC vs.
Revision 1.14 by root, Wed Mar 14 00:04:59 2007 UTC

87 our %FACEINFO; 87 our %FACEINFO;
88 our @ARC; 88 our @ARC;
89 our $TRS; 89 our $TRS;
90 our $NFILE; 90 our $NFILE;
91 our %ANIM; 91 our %ANIM;
92 our $SMOOTH;
93 92
94 our (@png, @trs, @arc); # files we are interested in 93 our (@png, @trs, @arc); # files we are interested in
95 94
96 sub commit_png { 95 sub commit_png {
97 my ($name, $data) = @_; 96 my ($name, $data) = @_;
257 $info->{visibility} = $visibility if defined $visibility; 256 $info->{visibility} = $visibility if defined $visibility;
258 $info->{magicmap} = $magicmap if defined $magicmap; 257 $info->{magicmap} = $magicmap if defined $magicmap;
259 } 258 }
260 259
261 if (my $smooth = delete $o->{smoothface}) { 260 if (my $smooth = delete $o->{smoothface}) {
262 $SMOOTH .= "$smooth\n"; 261 my ($face, $smooth) = split /\s+/, $smooth;
262 # skip empty_S.x11, it seems to server no purpose whatsoever
263 # but increases bandwidth demands and worse.
264 unless ($smooth eq "empty_S.x11") {
265 $FACEINFO{$face}{smooth} = $smooth;
266 }
263 } 267 }
264 } 268 }
265 } 269 }
266 } 270 }
267 } 271 }
337 substr $_->{editor_folder}, 0, 1 + length $path, "" for @ARC; 341 substr $_->{editor_folder}, 0, 1 + length $path, "" for @ARC;
338 print $fh Crossfire::archlist_to_string \@ARC; 342 print $fh Crossfire::archlist_to_string \@ARC;
339 } 343 }
340 344
341 { 345 {
342 open my $fh, ">:utf8", "$DATADIR/smooth~"
343 or die "$DATADIR/smooth~: $!";
344 print $fh $SMOOTH;
345 }
346
347 {
348 open my $fh, ">:utf8", "$DATADIR/treasures~" 346 open my $fh, ">:utf8", "$DATADIR/treasures~"
349 or die "$DATADIR/treasures~: $!"; 347 or die "$DATADIR/treasures~: $!";
350 print $fh $TRS; 348 print $fh $TRS;
351 } 349 }
352 350
365 or die "$DATADIR/faces~: $!"; 363 or die "$DATADIR/faces~: $!";
366 364
367 print $fh Storable::nfreeze \%FACEINFO; 365 print $fh Storable::nfreeze \%FACEINFO;
368 } 366 }
369 367
370 for (qw(archetypes faces animations treasures smooth)) { 368 for (qw(archetypes faces animations treasures)) {
371 chmod 0644, "$DATADIR/$_~"; 369 chmod 0644, "$DATADIR/$_~";
372 rename "$DATADIR/$_~", "$DATADIR/$_" 370 rename "$DATADIR/$_~", "$DATADIR/$_"
373 or die "$DATADIR/$_: $!"; 371 or die "$DATADIR/$_: $!";
374 } 372 }
375 373

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines