The "Leaf portals saw into leaf" error won't necessarily cause a fullbright compile; my last map had three or four such errors (and ran fine for months) before I finally put some effort into tracking them down and eliminating them.
FWIW, I wrote a PERL script to assist me in tracking these errors down. If anybody wants to use it, you're welcome to it. (I'll post the code below; just copy-paste into a file called leafsaw.pl
- and, of course, install PERL! :))
It works fairly simply. Just run it in the directory which contains both your
mymap.map file and your
mymap.log file. It will generate a
mymap_leafsaw.map file which you can oepn in Hammer; the new map has a red
light entity (with
targetname = leafsaw) at each of the coordinates listed in the error. These can be easily searched for with Hammer's entity report, marked, etc, giving you a very good idea of the bit of space where the error has occurred. Then just switch back to the same place in your RMF file (
don't forget to work on your RMF rather than the _leafsaw.map; I did that a few times...) and tweak the architecture a bit. (Generally you'll see the lights line up along a particular edge, telling you exactly which brush needs revising...)
The code is as follows:
#!/usr/bin/perl -w
use strict;
use File::Copy;
foreach my $f (<*.log>) {
print "Reading $fn";
my $fn = $f;
$fn =~ s/.log//;
my $map = $fn."_leafsaw.map";
copy($fn.".map",$map);
open LOG,$f;
open MAP,">>$map";
my $lcount = 0;
my $lpsil = 0;
foreach my $line (<LOG>) {
if ($line =~ /Leaf portals saw into leaf/) {
$lpsil = 1;
}
next unless $lpsil;
chomp $line;
if ($line =~ /(([-.0123456789]+) ([-.0123456789]+) ([-.0123456789]+))/) {
my ($x,$y,$z) = ($1,$2,$3);
$lcount++;
print MAP "{n"classname" "light"n"_light" "255 0 0 500"n";
print MAP ""targetname" "leafsaw"n"origin" "$x $y $z"n}n";
}
elsif ($line eq "") {
$lpsil = 0;
}
}
close MAP;
if ($lcount) {
print "Recorded $lcount Leaf_Saw_Into_Leaf marker lights into $mapn";
$lcount = 0;
}
else {
unlink $map;
}
}
print "nPress [Enter] to continue ... ";
<STDIN>;