mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 13:55:43 +00:00
47 lines
793 B
Plaintext
47 lines
793 B
Plaintext
#include maps\mp\_utility;
|
|
#include maps\mp\gametypes\_hud_util;
|
|
#include common_scripts\utility;
|
|
#include maps\mp\bots\_bot_utility;
|
|
|
|
init()
|
|
{
|
|
setDvarIfUninitialized( "bots_test", true );
|
|
|
|
if (!getDvarInt("bots_test"))
|
|
return;
|
|
|
|
level thread onConnected();
|
|
}
|
|
|
|
onConnected()
|
|
{
|
|
for (;;)
|
|
{
|
|
level waittill("connected", player);
|
|
|
|
player thread test();
|
|
}
|
|
}
|
|
|
|
test()
|
|
{
|
|
self endon("disconnect");
|
|
|
|
for (;;)
|
|
{
|
|
wait 0.05;
|
|
|
|
if (self is_bot())
|
|
continue;
|
|
|
|
myOrg = self.origin;
|
|
myOrg = (myOrg[0], myOrg[1], 0);
|
|
myAngles = self GetPlayerAngles();
|
|
myAngles = (0, myAngles[1], 0);
|
|
myVelocity = self GetVelocity();
|
|
myVelocity = (myVelocity[0], myVelocity[1], 0);
|
|
|
|
self sayall(GetConeDot(myOrg + myVelocity, myOrg, myAngles));
|
|
}
|
|
}
|