From 6b75ef0f42588e5fd1e0e35d948f9acb83e02abc Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 21 Jul 2010 15:54:13 +0200 Subject: [PATCH] map compiler: allow an option --no-fast that removes a -fast option (possibly including argument) from the command line --- misc/tools/xonotic-map-compiler | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/misc/tools/xonotic-map-compiler b/misc/tools/xonotic-map-compiler index 596a511c..12be54ad 100755 --- a/misc/tools/xonotic-map-compiler +++ b/misc/tools/xonotic-map-compiler @@ -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') -- 2.39.2