From 271e93c1f4add218361539bfc51c77a3a851cc46 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 10 Dec 2011 12:09:17 +0100 Subject: [PATCH] make tuba bots turn a little while playing --- misc/tools/midi2cfg-ng.conf | 80 +++++++++++++++++++++++++++++++++++++ misc/tools/midi2cfg-ng.pl | 2 +- 2 files changed, 81 insertions(+), 1 deletion(-) diff --git a/misc/tools/midi2cfg-ng.conf b/misc/tools/midi2cfg-ng.conf index 97730198..78248857 100644 --- a/misc/tools/midi2cfg-ng.conf +++ b/misc/tools/midi2cfg-ng.conf @@ -20,401 +20,481 @@ bot notebot time 0 cmd debug_assert_canfire 1 buttons left backward crouch attack1 + aim_random -5 5 0.05 time 0.05 note off -18 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -17 time 0 cmd debug_assert_canfire 1 buttons backward crouch attack1 + aim_random -5 5 0.05 time 0.05 note off -17 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -16 time 0 cmd debug_assert_canfire 1 buttons right backward crouch attack1 + aim_random -5 5 0.05 time 0.05 note off -16 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -13 time 0 cmd debug_assert_canfire 1 buttons forward right crouch attack1 + aim_random -5 5 0.05 time 0.05 note off -13 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -12 time 0 cmd debug_assert_canfire 1 buttons crouch attack1 + aim_random -5 5 0.05 time 0.05 note off -12 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -11 time 0 cmd debug_assert_canfire 1 buttons left backward crouch attack2 + aim_random -5 5 0.05 time 0.05 note off -11 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -10 time 0 cmd debug_assert_canfire 1 buttons right crouch attack1 + aim_random -5 5 0.05 time 0.05 note off -10 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -9 time 0 cmd debug_assert_canfire 1 buttons forward left crouch attack1 + aim_random -5 5 0.05 time 0.05 note off -9 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -8 time 0 cmd debug_assert_canfire 1 buttons forward crouch attack1 + aim_random -5 5 0.05 time 0.05 note off -8 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -7 time 0 cmd debug_assert_canfire 1 buttons left crouch attack1 + aim_random -5 5 0.05 time 0.05 note off -7 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -6 time 0 cmd debug_assert_canfire 1 buttons left backward attack1 + aim_random -5 5 0.05 time 0.05 note off -6 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -5 time 0 cmd debug_assert_canfire 1 buttons backward attack1 + aim_random -5 5 0.05 time 0.05 note off -5 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -4 time 0 cmd debug_assert_canfire 1 buttons backward right attack1 + aim_random -5 5 0.05 time 0.05 note off -4 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -3 time 0 cmd debug_assert_canfire 1 buttons right crouch attack2 + aim_random -5 5 0.05 time 0.05 note off -3 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -2 time 0 cmd debug_assert_canfire 1 buttons forward left crouch attack2 + aim_random -5 5 0.05 time 0.05 note off -2 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on -1 time 0 cmd debug_assert_canfire 1 buttons forward right attack1 + aim_random -5 5 0.05 time 0.05 note off -1 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 0 time 0 cmd debug_assert_canfire 1 buttons attack1 + aim_random -5 5 0.05 time 0.05 note off 0 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 1 time 0 cmd debug_assert_canfire 1 buttons left backward attack2 + aim_random -5 5 0.05 time 0.05 note off 1 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 2 time 0 cmd debug_assert_canfire 1 buttons right attack1 + aim_random -5 5 0.05 time 0.05 note off 2 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 3 time 0 cmd debug_assert_canfire 1 buttons forward left attack1 + aim_random -5 5 0.05 time 0.05 note off 3 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 4 time 0 cmd debug_assert_canfire 1 buttons forward attack1 + aim_random -5 5 0.05 time 0.05 note off 4 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 5 time 0 cmd debug_assert_canfire 1 buttons left attack1 + aim_random -5 5 0.05 time 0.05 note off 5 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 6 time 0 cmd debug_assert_canfire 1 buttons forward right attack2 + aim_random -5 5 0.05 time 0.05 note off 6 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 7 time 0 cmd debug_assert_canfire 1 buttons attack2 + aim_random -5 5 0.05 time 0.05 note off 7 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 8 time 0 cmd debug_assert_canfire 1 buttons backward right jump attack1 + aim_random -5 5 0.05 time 0.05 note off 8 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 9 time 0 cmd debug_assert_canfire 1 buttons right attack2 + aim_random -5 5 0.05 time 0.05 note off 9 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 10 time 0 cmd debug_assert_canfire 1 buttons forward left attack2 + aim_random -5 5 0.05 time 0.05 note off 10 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 11 time 0 cmd debug_assert_canfire 1 buttons forward attack2 + aim_random -5 5 0.05 time 0.05 note off 11 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 12 time 0 cmd debug_assert_canfire 1 buttons left attack2 + aim_random -5 5 0.05 time 0.05 note off 12 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 13 time 0 cmd debug_assert_canfire 1 buttons left backward jump attack2 + aim_random -5 5 0.05 time 0.05 note off 13 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 14 time 0 cmd debug_assert_canfire 1 buttons right jump attack1 + aim_random -5 5 0.05 time 0.05 note off 14 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 15 time 0 cmd debug_assert_canfire 1 buttons forward left jump attack1 + aim_random -5 5 0.05 time 0.05 note off 15 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 16 time 0 cmd debug_assert_canfire 1 buttons forward jump attack1 + aim_random -5 5 0.05 time 0.05 note off 16 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 17 time 0 cmd debug_assert_canfire 1 buttons left jump attack1 + aim_random -5 5 0.05 time 0.05 note off 17 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 18 time 0 cmd debug_assert_canfire 1 buttons forward right jump attack2 + aim_random -5 5 0.05 time 0.05 note off 18 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 19 time 0 cmd debug_assert_canfire 1 buttons jump attack2 + aim_random -5 5 0.05 time 0.05 note off 19 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 21 time 0 cmd debug_assert_canfire 1 buttons right jump attack2 + aim_random -5 5 0.05 time 0.05 note off 21 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 22 time 0 cmd debug_assert_canfire 1 buttons forward left jump attack2 + aim_random -5 5 0.05 time 0.05 note off 22 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 23 time 0 cmd debug_assert_canfire 1 buttons forward jump attack2 + aim_random -5 5 0.05 time 0.05 note off 23 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 note on 24 time 0 cmd debug_assert_canfire 1 buttons left jump attack2 + aim_random -5 5 0.05 time 0.05 note off 24 time -0.05 cmd debug_assert_canfire 0 buttons + aim_random -5 5 0.05 time 0 bot tuba diff --git a/misc/tools/midi2cfg-ng.pl b/misc/tools/midi2cfg-ng.pl index 70a37517..c2c3f47f 100755 --- a/misc/tools/midi2cfg-ng.pl +++ b/misc/tools/midi2cfg-ng.pl @@ -344,7 +344,7 @@ sub busybot_cmd_bot_execute($$@) } elsif($_->[0] eq 'aim_random') { - $commands .= sprintf "sv_cmd bot_cmd %d aim %f 0 %f\n", $_->[1] + rand($_->[2] - $_->[1]), $_->[3]; + $commands .= sprintf "sv_cmd bot_cmd %d aim %f 0 %f\n", $bot->{id}, $_->[1] + rand($_->[2] - $_->[1]), $_->[3]; } elsif($_->[0] eq 'barrier') { -- 2.39.2