mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 13:55:43 +00:00
Oops
This commit is contained in:
parent
aeb9030ff8
commit
432427dd99
@ -161,6 +161,7 @@ resetBotVars()
|
|||||||
self.bot.lockingon = false;
|
self.bot.lockingon = false;
|
||||||
|
|
||||||
self.bot.knifing = false;
|
self.bot.knifing = false;
|
||||||
|
self.bot.knifingafter = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -880,7 +881,7 @@ doSwitch(newWeapon)
|
|||||||
if (isDefined(self.lastDroppableWeapon) && self.lastDroppableWeapon != newWeapon)
|
if (isDefined(self.lastDroppableWeapon) && self.lastDroppableWeapon != newWeapon)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!isDefined(self.lastStand))
|
if (!isDefined(self.lastStand) && !self.bot.isfraggingafter && !self.bot.knifingafter)
|
||||||
self thread botDoAnim("pt_stand_core_pullout", 0.5, true);
|
self thread botDoAnim("pt_stand_core_pullout", 0.5, true);
|
||||||
|
|
||||||
self.bot.isswitching = true;
|
self.bot.isswitching = true;
|
||||||
@ -1508,7 +1509,7 @@ onNewEnemy()
|
|||||||
if(!isDefined(self.bot.target))
|
if(!isDefined(self.bot.target))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(!isDefined(self.bot.target.entity) || !isPlayer(self.bot.target.entity))
|
if(!isDefined(self.bot.target.entity) || !self.bot.target.isplay)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(self.bot.target.didlook)
|
if(self.bot.target.didlook)
|
||||||
@ -1900,7 +1901,7 @@ walk()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isPlayer(self.bot.target.entity) && self.bot.target.trace_time && self canFire(curweap) && self isInRange(self.bot.target.dist, curweap))
|
if(self.bot.target.isplay && self.bot.target.trace_time && self canFire(curweap) && self isInRange(self.bot.target.dist, curweap))
|
||||||
{
|
{
|
||||||
if(self.bot.target.rand <= self.pers["bots"]["behavior"]["strafe"])
|
if(self.bot.target.rand <= self.pers["bots"]["behavior"]["strafe"])
|
||||||
self strafe(self.bot.target.entity);
|
self strafe(self.bot.target.entity);
|
||||||
@ -2102,7 +2103,11 @@ knife(ent, knifeDist)
|
|||||||
self endon("disconnect");
|
self endon("disconnect");
|
||||||
self endon("death");
|
self endon("death");
|
||||||
|
|
||||||
|
self notify("bot_kill_knife");
|
||||||
|
self endon("bot_kill_knife");
|
||||||
|
|
||||||
self.bot.knifing = true;
|
self.bot.knifing = true;
|
||||||
|
self.bot.knifingafter = true;
|
||||||
|
|
||||||
isplay = isPlayer(ent);
|
isplay = isPlayer(ent);
|
||||||
curWeap = self GetCurrentWeapon();
|
curWeap = self GetCurrentWeapon();
|
||||||
@ -2119,9 +2124,13 @@ knife(ent, knifeDist)
|
|||||||
lastWeap = self GetCurrentWeapon();
|
lastWeap = self GetCurrentWeapon();
|
||||||
|
|
||||||
hasC4 = self HasWeapon("c4_mp");
|
hasC4 = self HasWeapon("c4_mp");
|
||||||
|
|
||||||
|
if (!usedRiot)
|
||||||
|
{
|
||||||
if (!hasC4)
|
if (!hasC4)
|
||||||
self giveWeapon("c4_mp");
|
self giveWeapon("c4_mp");
|
||||||
self setSpawnWeapon("c4_mp");
|
self setSpawnWeapon("c4_mp");
|
||||||
|
}
|
||||||
|
|
||||||
// play sound
|
// play sound
|
||||||
if (usedRiot)
|
if (usedRiot)
|
||||||
@ -2160,6 +2169,7 @@ knife(ent, knifeDist)
|
|||||||
botAnimTime = 1.5;
|
botAnimTime = 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (botAnim != "")
|
||||||
self thread botDoAnim(botAnim, botAnimTime, true);
|
self thread botDoAnim(botAnim, botAnimTime, true);
|
||||||
|
|
||||||
wait 0.15;
|
wait 0.15;
|
||||||
@ -2223,11 +2233,18 @@ knife(ent, knifeDist)
|
|||||||
else
|
else
|
||||||
wait 2;
|
wait 2;
|
||||||
|
|
||||||
|
if (!usedRiot)
|
||||||
|
{
|
||||||
if (!hasC4)
|
if (!hasC4)
|
||||||
self takeWeapon("c4_mp");
|
self takeWeapon("c4_mp");
|
||||||
self setSpawnWeapon(lastWeap);
|
self setSpawnWeapon(lastWeap);
|
||||||
|
}
|
||||||
|
|
||||||
self.bot.knifing = false;
|
self.bot.knifing = false;
|
||||||
|
|
||||||
|
wait 1;
|
||||||
|
|
||||||
|
self.bot.knifingafter = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user