mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-05-11 14:44: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)
|
if(no_trace_time > no_trace_ads_time)
|
||||||
{
|
{
|
||||||
self ads(false);
|
|
||||||
|
|
||||||
if(isplay)
|
if(isplay)
|
||||||
{
|
{
|
||||||
//better room to nade? cook time function with dist?
|
//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);
|
self botLookAt(last_pos + (0, 0, self getEyeHeight() + nadeAimOffset), aimspeed);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
self stopNading();
|
|
||||||
|
|
||||||
if(isplay)
|
if(isplay)
|
||||||
{
|
{
|
||||||
aimpos = target getTagOrigin( "j_spineupper" ) + (0, 0, nadeAimOffset);
|
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)
|
if(isplay && conedot > 0.9 && dist < level.bots_maxKnifeDistance && trace_time > reaction_time)
|
||||||
{
|
{
|
||||||
self ads(false);
|
|
||||||
self knife();
|
self knife();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!self canFire(curweap) || !self isInRange(dist, curweap))
|
if(!self canFire(curweap) || !self isInRange(dist, curweap))
|
||||||
{
|
{
|
||||||
self ads(false);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//c4 logic here, but doesnt work anyway
|
//c4 logic here, but doesnt work anyway
|
||||||
|
|
||||||
canADS = self canAds(dist, curweap);
|
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)
|
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))
|
if (!isDefined(self.bot.script_aimpos))
|
||||||
{
|
{
|
||||||
lookat = undefined;
|
lookat = undefined;
|
||||||
@ -988,17 +976,6 @@ doSemiTime()
|
|||||||
self.bot.semi_time = false;
|
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.
|
Returns a random grenade in the bot's inventory.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user