From: Rudolf Polzer Date: Wed, 21 Jul 2010 13:54:13 +0000 (+0200) Subject: map compiler: allow an option --no-fast that removes a -fast option (possibly includi... X-Git-Tag: xonotic-v0.1.0preview~347 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=6b75ef0f42588e5fd1e0e35d948f9acb83e02abc map compiler: allow an option --no-fast that removes a -fast option (possibly including argument) from the command line --- 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')