From 9b9cf0d6e1b76e5e10a3d2d22a5db8e29bd48229 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 10 Dec 2011 12:04:53 +0100 Subject: [PATCH] add an aim_random bot command --- misc/tools/midi2cfg-ng.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/tools/midi2cfg-ng.pl b/misc/tools/midi2cfg-ng.pl index 2c792744..70a37517 100755 --- a/misc/tools/midi2cfg-ng.pl +++ b/misc/tools/midi2cfg-ng.pl @@ -342,6 +342,10 @@ sub busybot_cmd_bot_execute($$@) { $commands .= sprintf "sv_cmd bot_cmd %d %s\n", $bot->{id}, join " ", @{$_}[1..@$_-1]; } + elsif($_->[0] eq 'aim_random') + { + $commands .= sprintf "sv_cmd bot_cmd %d aim %f 0 %f\n", $_->[1] + rand($_->[2] - $_->[1]), $_->[3]; + } elsif($_->[0] eq 'barrier') { $commands .= sprintf "sv_cmd bot_cmd %d barrier\n", $bot->{id}; -- 2.39.2