From: Rudolf Polzer Date: Fri, 23 Sep 2011 13:21:50 +0000 (+0200) Subject: fixes in killing notes X-Git-Tag: xonotic-v0.6.0~82 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ecff01b83d1fc9b70c378474cc2fe29862ba0b51;p=xonotic%2Fxonotic.git fixes in killing notes --- diff --git a/misc/tools/midi2cfg-ng.pl b/misc/tools/midi2cfg-ng.pl index ca6fe9b8..8ed002e2 100755 --- a/misc/tools/midi2cfg-ng.pl +++ b/misc/tools/midi2cfg-ng.pl @@ -238,7 +238,7 @@ sub busybot_cmd_bot_cmdinfo(@) $mintime = $_->[1] if not defined $mintime or $_->[1] < $mintime; $maxtime = $_->[1] + SYS_TICRATE - if not defined $maxtime or $_->[1] > $maxtime; + if not defined $maxtime or $_->[1] + SYS_TICRATE > $maxtime; } elsif($_->[0] eq 'busy') { @@ -575,12 +575,13 @@ sub busybot_note_on($$$$) next unless $cmds; my ($mintime, $maxtime, $busytime) = busybot_cmd_bot_cmdinfo @$cmds; + my ($mintime_off, $maxtime_off, $busytime_off) = busybot_cmd_bot_cmdinfo @$busy_cmds_off; - my $noteofftime = busybot_cmd_bot_matchtime $bot, $time + $notetime + $mintime, $time, @$busy_cmds_off; + my $noteofftime = busybot_cmd_bot_matchtime $bot, $time + $notetime + $mintime, $time + $notetime, @$busy_cmds_off; next if $noteofftime < $bot->{busytimer}; next - if $noteofftime + $mintime < $bot->{timer}; + if $noteofftime + $mintime_off < $bot->{timer}; my $score = 0; # prefer turning off long notes