]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
add an aim_random bot command
authorRudolf Polzer <divverent@xonotic.org>
Sat, 10 Dec 2011 11:04:53 +0000 (12:04 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 10 Dec 2011 11:04:53 +0000 (12:04 +0100)
misc/tools/midi2cfg-ng.pl

index 2c792744320e76cdb1ac732a7edfb7e79c7dc48e..70a37517b26536eafea744c9f67a897c69003b8b 100755 (executable)
@@ -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};