From 3fd280fc826c1b7c1d20cb740f68df1ef34323b2 Mon Sep 17 00:00:00 2001 From: div0 Date: Fri, 12 Jun 2009 10:21:52 +0000 Subject: [PATCH] fix some barrier and note stuff git-svn-id: svn://svn.icculus.org/nexuiz/trunk@7004 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- misc/tools/midi2cfg-ng.conf | 135 ++++++++++++++++++++++++++++++++++-- misc/tools/midi2cfg-ng.pl | 3 + misc/tools/midichannels.pl | 1 + 3 files changed, 134 insertions(+), 5 deletions(-) diff --git a/misc/tools/midi2cfg-ng.conf b/misc/tools/midi2cfg-ng.conf index 21625dee2..2e9663781 100644 --- a/misc/tools/midi2cfg-ng.conf +++ b/misc/tools/midi2cfg-ng.conf @@ -143,9 +143,9 @@ bot tuba busy 0.25 note on -1 time -0.05 - buttons forward left + buttons forward right time 0 - buttons attack1 forward left + buttons attack1 forward right time 0.05 buttons time 0.1 @@ -479,7 +479,6 @@ bot hagar cmd barrier cmd selectweapon 8 cmd wait 0.5 - cmd console "g_balance_hagar_primary_lifetime 0.1" percussion 35 time 0 buttons attack1 @@ -523,7 +522,6 @@ bot laser cmd barrier cmd selectweapon 1 cmd wait 0.5 - cmd console "g_balance_laser_primary_lifetime 0.2" percussion 39 time 0 buttons attack1 @@ -540,6 +538,13 @@ bot electro cmd barrier cmd selectweapon 5 cmd wait 0.5 + percussion 49 + time 0 + buttons attack1 + time 0.05 + buttons + time 0.1 + busy 0.6 bot hook channels 10 @@ -590,7 +595,7 @@ bot tuba3 cmd movetotarget goaway bot tuba4 - include tuba_red + include tuba_blue count 1 init cmd movetotarget tUba4 @@ -599,6 +604,126 @@ bot tuba4 done cmd movetotarget goaway +bot tuba5 + include tuba_red + count 1 + init + cmd movetotarget tUba5 + cmd barrier + super + done + cmd movetotarget goaway + +bot tuba6 + include tuba_blue + count 1 + init + cmd movetotarget tUba6 + cmd barrier + super + done + cmd movetotarget goaway + +bot tuba7 + include tuba_red + count 1 + init + cmd movetotarget tUba7 + cmd barrier + super + done + cmd movetotarget goaway + +bot tuba8 + include tuba_blue + count 1 + init + cmd movetotarget tUba8 + cmd barrier + super + done + cmd movetotarget goaway + +bot tuba9 + include tuba_red + count 1 + init + cmd movetotarget tUba9 + cmd barrier + super + done + cmd movetotarget goaway + +bot tuba10 + include tuba_blue + count 1 + init + cmd movetotarget tUba10 + cmd barrier + super + done + cmd movetotarget goaway + +bot tuba11 + include tuba_red + count 1 + init + cmd movetotarget tUba11 + cmd barrier + super + done + cmd movetotarget goaway + +bot tuba12 + include tuba_blue + count 1 + init + cmd movetotarget tUba12 + cmd barrier + super + done + cmd movetotarget goaway + +bot tuba13 + include tuba_red + count 1 + init + cmd movetotarget tUba13 + cmd barrier + super + done + cmd movetotarget goaway + +bot tuba14 + include tuba_blue + count 1 + init + cmd movetotarget tUba14 + cmd barrier + super + done + cmd movetotarget goaway + +bot tuba15 + include tuba_red + count 1 + init + cmd movetotarget tUba15 + cmd barrier + super + done + cmd movetotarget goaway + +bot tuba16 + include tuba_blue + count 1 + init + cmd movetotarget tUba16 + cmd barrier + super + done + cmd movetotarget goaway + # percussion bots: bot chair11 diff --git a/misc/tools/midi2cfg-ng.pl b/misc/tools/midi2cfg-ng.pl index c3da444a0..514b5f301 100755 --- a/misc/tools/midi2cfg-ng.pl +++ b/misc/tools/midi2cfg-ng.pl @@ -66,6 +66,7 @@ for my $track(0..@$tracks-1) for($tracks->[$track]->events()) { my ($command, $delta, @data) = @$_; + $command = 'note_off' if $command eq 'note_on' and $data[2] == 0; $tick += $delta; push @allmidievents, [$command, $tick, $sequence++, $track, @data]; } @@ -305,6 +306,7 @@ sub busybot_note_on_bot($$$$$) { return 0 if not busybot_cmd_bot_test $bot, $time + $notetime, @$cmds; + busybot_cmd_bot_execute $bot, 0, ['cmd', 'barrier_init']; busybot_cmd_bot_execute $bot, 0, ['cmd', 'wait', $timeoffset]; busybot_cmd_bot_execute $bot, 0, ['cmd', 'barrier']; busybot_cmd_bot_execute $bot, 0, @{$bot->{init}} @@ -404,6 +406,7 @@ for(@preallocate) my $bot = Storable::dclone $busybots->{$_}; $bot->{id} = @busybots_allocated + 1; $bot->{classname} = $_; + busybot_cmd_bot_execute $bot, 0, ['cmd', 'barrier_init']; busybot_cmd_bot_execute $bot, 0, ['cmd', 'wait', $timeoffset]; busybot_cmd_bot_execute $bot, 0, ['cmd', 'barrier']; busybot_cmd_bot_execute $bot, 0, @{$bot->{init}} diff --git a/misc/tools/midichannels.pl b/misc/tools/midichannels.pl index f1ccc7747..0bbbccd41 100644 --- a/misc/tools/midichannels.pl +++ b/misc/tools/midichannels.pl @@ -65,6 +65,7 @@ while() my $t = 0; for($tracks->[$_]->events()) { + $_->[0] = 'note_off' if $_->[0] eq 'note_on' and $_->[4] == 0; $t += $_->[1]; my $p = $chanpos{$_->[0]}; if(defined $p) -- 2.39.2