This commit is contained in:
Your Name 2020-08-07 20:26:13 -06:00
parent f624cb65cf
commit 7c06bc9979
2 changed files with 108 additions and 26 deletions

View File

@ -212,6 +212,52 @@ botThrowGrenade(grenName)
return ret;
}
pressAds(time)
{
self endon("death");
self endon("disconnect");
self notify("bot_ads");
self endon("bot_ads");
if(!isDefined(time))
time = 0.1;
self ads(true);
if(time)
wait time;
self ads(false);
}
ads(what)
{
self.bot.ads_pressed = what;
}
pressFire(time)
{
self endon("death");
self endon("disconnect");
self notify("bot_fire");
self endon("bot_fire");
if(!isDefined(time))
time = 0.1;
self fire(true);
if(time)
wait time;
self fire(false);
}
fire(what)
{
self.bot.fire_pressed = what;
}
/*
Bot will jump.
*/
@ -250,7 +296,7 @@ jump()
*/
stand()
{
self botSetStance("stand");
self.bot.stance = "stand";
}
/*
@ -258,7 +304,7 @@ stand()
*/
crouch()
{
self botSetStance("crouch");
self.bot.stance = "crouch";
}
/*
@ -271,7 +317,7 @@ prone()
if (curWeap == "riotshield_mp")
return;
self botSetStance("prone");
self.bot.stance = "prone";
}
botMoveTo(to)

View File

@ -21,42 +21,78 @@ botAdsAmount()
return (1 / (self.bot.ads_highest - self.bot.ads_lowest)) * self.bot.ads_tightness + (1 + (self.bot.ads_highest / (self.bot.ads_lowest - self.bot.ads_highest)));
}
ads(what)
// aim loop needs work
BotPressADS(time)
{
self.bot.ads_pressed = what;
self maps\mp\bots\_bot_internal::pressAds(time);
}
pressFire(time)
BotPressAttack(time)
{
self endon("death");
self endon("disconnect");
self notify("bot_fire");
self endon("bot_fire");
if(!isDefined(time))
time = 0.1;
self fire(true);
if(time)
wait time;
self fire(false);
self maps\mp\bots\_bot_internal::pressFire(time);
}
botThrowGrenade(gname)
throwBotGrenade(gname)
{
return maps\mp\bots\_bot_internal::botThrowGrenade(gname);
return self maps\mp\bots\_bot_internal::botThrowGrenade(gname);
}
fire(what)
BotGetTargetRandom()
{
self.bot.fire_pressed = what;
if (!isDefined(self.bot.target))
return undefined;
return self.bot.target.rand;
}
botSetStance(stance)
/*
Returns the bot's random assigned number.
*/
BotGetRandom()
{
self.bot.stance = stance;
return self.bot.rand;
}
/*
Returns if the bot is pressing frag button.
*/
IsBotFragging()
{
return self.bot.isfragging;
}
/*
Returns if the bot is sprinting.
*/
IsBotSprinting()
{
return self.bot.running;
}
/*
Returns if the bot is reloading.
*/
IsBotReloading()
{
return self.bot.isreloading;
}
/*
Freezes the bot's controls.
*/
BotFreezeControls(what)
{
self.bot.isfrozen = what;
if(what)
self notify("kill_goal");
}
/*
Returns if the bot is script frozen.
*/
BotIsFrozen()
{
return self.bot.isfrozen;
}
/*