From: Rudolf Polzer Date: Sat, 10 Dec 2011 11:04:53 +0000 (+0100) Subject: add an aim_random bot command X-Git-Tag: xonotic-v0.6.0~41 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9b9cf0d6e1b76e5e10a3d2d22a5db8e29bd48229;p=xonotic%2Fxonotic.git add an aim_random bot command --- 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};