]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
map compiler: allow an option --no-fast that removes a -fast option (possibly includi...
authorRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 13:54:13 +0000 (15:54 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 13:54:13 +0000 (15:54 +0200)
misc/tools/xonotic-map-compiler

index 596a511ca259f5d3774de7678cde8a10cc181b34..12be54ad7d0848cfcba200316255aa50073c0dd7 100755 (executable)
@@ -134,6 +134,16 @@ while(@ARGV)
        {
                $options->{order} = [split /\s*,\s*/, shift @ARGV];
        }
+       elsif($_ =~ /^--no(-.*)/)
+       {
+               if($curmode eq 'maps')
+               {
+                       $curmode = 'bsp';
+               }
+               my $flag = $1;
+               @{$options->{$curmode}} = grep { (($_ eq $flag) ... /^-/) !~ /^[0-9]+$/ } @{$options->{$curmode}};
+                       # so, e.g. --no-samplesize removes "-samplesize" and a following "3"
+       }
        elsif($_ =~ /^-(-.*)/)
        {
                if($curmode eq 'maps')