vis_timeout => 0,
light_timeout => 0,
minimap_timeout => 0,
- scale_timeout => 0
+ scale_timeout => 0,
+ timeout_stealing => 0,
};
my $curmode = 'maps';
{
$options->{scale_timeout} = shift @ARGV;
}
+ elsif($_ eq '-timeout_stealing')
+ {
+ $options->{timeout_stealing} = shift @ARGV;
+ }
elsif($_ eq '-order')
{
$options->{order} = [split /\s*,\s*/, shift @ARGV];
}
my $linkdir = File::Temp::tempdir("xonotic-map-compiler.XXXXXX", TMPDIR => 1, CLEANUP => 1);
+my $starttime = time;
+my $endtime = time;
sub q3map2(@)
{
$timeout = $options->{minimap_timeout} if $mode eq '-minimap';
$timeout = $options->{scale_timeout} if $mode eq '-scale';
die "Invalid call: not a standard q3map2 stage" if not defined $timeout;
+ $endtime += $timeout;
+ my $stolen_timeout = $endtime - time;
+ if ($stolen_timeout > $timeout)
+ {
+ $timeout += ($stolen_timeout - $timeout) * $options->{timeout_stealing};
+ }
my @args = ($Q3MAP2, split(/\s+/, $Q3MAP2FLAGS), '-game', 'xonotic', '-fs_basepath', $XONOTICDIR, '-fs_basepath', $linkdir, '-v', @_);
print "\$ @args\n";
+ print "Using timeout: $timeout\n";
defined(my $pid = fork())
or die "fork: $!";
if($pid) # parent
url_ssh=xonotic-beta:autobuild-bsp/
build_cachedir="$HOME/xonotic-map-compiler.cache/"
screenshot_cachedir="$HOME/xonotic-map-screenshot.cache/"
-build_override="-bsp_timeout 3600 -vis_timeout 10800 -light_timeout 14400 -minimap_timeout 900 -scale_timeout 900"
+build_override="-bsp_timeout 3600 -vis_timeout 10800 -light_timeout 18000 -minimap_timeout 900 -scale_timeout 900 -timeout_stealing 0.75"
screenshot_override="9 900 5 +g_ctf 1"
getthemap_fail=false