mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-05-10 22:24:52 +00:00
fixed script ads and grenade
This commit is contained in:
parent
a48e5e05ed
commit
c36fe1c8d9
@ -852,8 +852,6 @@ aim()
|
||||
{
|
||||
if(no_trace_time > no_trace_ads_time)
|
||||
{
|
||||
self ads(false);
|
||||
|
||||
if(isplay)
|
||||
{
|
||||
//better room to nade? cook time function with dist?
|
||||
@ -871,18 +869,12 @@ aim()
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self stopNading();
|
||||
}
|
||||
}
|
||||
|
||||
self botLookAt(last_pos + (0, 0, self getEyeHeight() + nadeAimOffset), aimspeed);
|
||||
continue;
|
||||
}
|
||||
|
||||
self stopNading();
|
||||
|
||||
if(isplay)
|
||||
{
|
||||
aimpos = target getTagOrigin( "j_spineupper" ) + (0, 0, nadeAimOffset);
|
||||
@ -909,21 +901,20 @@ aim()
|
||||
|
||||
if(isplay && conedot > 0.9 && dist < level.bots_maxKnifeDistance && trace_time > reaction_time)
|
||||
{
|
||||
self ads(false);
|
||||
self knife();
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!self canFire(curweap) || !self isInRange(dist, curweap))
|
||||
{
|
||||
self ads(false);
|
||||
continue;
|
||||
}
|
||||
|
||||
//c4 logic here, but doesnt work anyway
|
||||
|
||||
canADS = self canAds(dist, curweap);
|
||||
self ads(canADS);
|
||||
if (canADS)
|
||||
self thread pressADS();
|
||||
|
||||
if((!canADS || self playerads() == 1.0) && (conedot > 0.95 || dist < level.bots_maxKnifeDistance) && trace_time > reaction_time)
|
||||
{
|
||||
@ -934,9 +925,6 @@ aim()
|
||||
}
|
||||
}
|
||||
|
||||
self ads(false);
|
||||
self stopNading();
|
||||
|
||||
if (!isDefined(self.bot.script_aimpos))
|
||||
{
|
||||
lookat = undefined;
|
||||
@ -988,17 +976,6 @@ doSemiTime()
|
||||
self.bot.semi_time = false;
|
||||
}
|
||||
|
||||
/*
|
||||
Stop the bot from nading.
|
||||
*/
|
||||
stopNading()
|
||||
{
|
||||
if(self.bot.isfragging)
|
||||
self thread frag(0);
|
||||
if(self.bot.issmoking)
|
||||
self thread smoke(0);
|
||||
}
|
||||
|
||||
/*
|
||||
Returns a random grenade in the bot's inventory.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user