--- deliantra/server/lib/collect.pl.in 2007/02/08 02:21:18 1.5 +++ deliantra/server/lib/collect.pl.in 2007/02/11 09:31:28 1.7 @@ -233,12 +233,13 @@ open(ARC,$arch) || &die("cannot open ".$arch); line: while() { chop; - ($var,@values) = split; - if ($var =~ /^\s*(?:#?.*|)$/) { - #developper comment, switch to next line + if (/^\s*(?:#.*|)$/) { + # comment, skip line $commentNum++; next line; - } elsif ($var eq "Object") { + } + ($var, @values) = split; + if ($var =~ /^[Oo]bject$/) { $lface[0] = ""; $#lface = 0; $lfg = ""; @@ -259,6 +260,7 @@ if ($walkon && !$nopick) { &warn("File $arch has an object with walk_on set which can be picked up\n"); } + print ARCH "editor_folder $pathto\n" if $pathto ne ""; # Process the color/face info now } elsif ($var eq "color_fg") { $lfg = $values[0]; @@ -266,8 +268,6 @@ } elsif ($var eq "color_bg") { $lbg = $values[0]; next line; - } elsif ($var eq "end") { - print ARCH "editor_folder $pathto\n" if $pathto ne ""; } elsif ($var eq "visibility") { $lvis = $values[0]; next line; @@ -296,6 +296,8 @@ $nopick = $values[0]; } elsif ($var eq "walk_on") { $walkon = $values[0]; + } elsif ($var eq "face" && ! $faces{$values[0]}) { + &warn($arch." is missing face ".$values[0]) } elsif ($var eq "face") { $lface[$#lface++] = $values[0] } elsif ($var eq "anim") { @@ -318,8 +320,6 @@ } print ARCH "animation $arch\n"; next line; # don't want the mina - } elsif ($var eq "face" && ! $faces{$values[0]}) { - &warn($arch." is missing face ".$values[0]) } elsif ($var eq "smoothface") { if ($smoothing{$values[0]} && ($smoothing{$values[0]} ne $values[1])) { &warn($arch." duplicate smoothface for ".$values[0].": ".$smoothing{$values[0]}." and ".$values[1]);