mirror of
https://github.com/ineedbots/iw5_bot_warfare.git
synced 2025-04-25 23:29:12 +00:00
Bots use remote turret
This commit is contained in:
parent
eb70ccac5d
commit
955daae077
@ -340,11 +340,42 @@ watchUsingRemote()
|
||||
self watchUsingUav();
|
||||
}
|
||||
|
||||
if (isDefined(self.using_remote_turret) && self.using_remote_turret)
|
||||
{
|
||||
self watchUsingTurret();
|
||||
}
|
||||
|
||||
self.bot.targets = [];
|
||||
self notify("kill_goal");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
watchUsingTurret
|
||||
*/
|
||||
watchUsingTurret()
|
||||
{
|
||||
if(!isDefined(self.remoteTurretList) || !isDefined(self.remoteTurretList[0]))
|
||||
return;
|
||||
|
||||
turret = self.remoteTurretList[0];
|
||||
|
||||
turret endon("death");
|
||||
|
||||
while (isDefined(self.using_remote_turret) && self.using_remote_turret)
|
||||
{
|
||||
if (self getCurrentWeapon() != "killstreak_remote_turret_remote_mp")
|
||||
{
|
||||
self changeToWeap("killstreak_remote_turret_remote_mp");
|
||||
}
|
||||
|
||||
if (isDefined(self.bot.target))
|
||||
self thread pressFire();
|
||||
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Uses tank
|
||||
*/
|
||||
|
@ -1616,6 +1616,7 @@ start_bot_threads()
|
||||
{
|
||||
self thread bot_killstreak_think();
|
||||
self thread bot_box_think();
|
||||
self thread bot_watch_use_remote_turret();
|
||||
}
|
||||
|
||||
self thread bot_weapon_think();
|
||||
@ -4290,6 +4291,41 @@ bot_attack_vehicle( target )
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Bot watch to use remote turret
|
||||
*/
|
||||
bot_watch_use_remote_turret()
|
||||
{
|
||||
self endon("death");
|
||||
self endon("disconnect");
|
||||
|
||||
for (;;)
|
||||
{
|
||||
wait 5;
|
||||
|
||||
if(self BotIsFrozen())
|
||||
continue;
|
||||
|
||||
if(self HasThreat() || self HasBotJavelinLocation())
|
||||
continue;
|
||||
|
||||
if(self isDefusing() || self isPlanting())
|
||||
continue;
|
||||
|
||||
if (self IsUsingRemote())
|
||||
continue;
|
||||
|
||||
if (self InLastStand() && !self InFinalStand())
|
||||
continue;
|
||||
|
||||
if(!isDefined(self.remoteTurretList) || !isDefined(self.remoteTurretList[0]))
|
||||
continue;
|
||||
|
||||
self thread BotPressUse(3);
|
||||
wait 3;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Returns an origin thats good to use for a kill streak
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user