add an aim_random bot command

This commit is contained in:
Rudolf Polzer 2011-12-10 12:04:53 +01:00
parent 010447c9e3
commit 9b9cf0d6e1

View File

@ -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};