mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-23 22:35:43 +00:00
Better
This commit is contained in:
parent
440a3c561b
commit
0604980d8e
@ -428,7 +428,6 @@ doBotMovement()
|
|||||||
move_To = self.bot.moveTo;
|
move_To = self.bot.moveTo;
|
||||||
angles = self GetPlayerAngles();
|
angles = self GetPlayerAngles();
|
||||||
dir = (0, 0, 0);
|
dir = (0, 0, 0);
|
||||||
eye = self getEye();
|
|
||||||
|
|
||||||
if (DistanceSquared(self.origin, move_To) >= 49)
|
if (DistanceSquared(self.origin, move_To) >= 49)
|
||||||
{
|
{
|
||||||
@ -454,15 +453,11 @@ doBotMovement()
|
|||||||
if (self isMantling())
|
if (self isMantling())
|
||||||
self crouch();
|
self crouch();
|
||||||
|
|
||||||
// check if need to knife glass
|
|
||||||
bt = bulletTrace(eye, eye + anglesToForward(angles) * FORWARDAMOUNT, false, self);
|
|
||||||
if (bt["surfacetype"] == "glass")
|
|
||||||
self thread knife();
|
|
||||||
|
|
||||||
|
|
||||||
startPos = self.origin + (0, 0, 50);
|
startPos = self.origin + (0, 0, 50);
|
||||||
startPosForward = startPos + anglesToForward((0, angles[1], 0)) * FORWARDAMOUNT;
|
startPosForward = startPos + anglesToForward((0, angles[1], 0)) * FORWARDAMOUNT;
|
||||||
if (bulletTracePassed(startPos, startPosForward, false, self))
|
bt = bulletTrace(startPos, startPosForward, false, self);
|
||||||
|
if (bt["fraction"] >= 1)
|
||||||
{
|
{
|
||||||
// check if need to jump
|
// check if need to jump
|
||||||
bt = bulletTrace(startPosForward, startPosForward - (0, 0, 40), false, self);
|
bt = bulletTrace(startPosForward, startPosForward - (0, 0, 40), false, self);
|
||||||
@ -473,6 +468,15 @@ doBotMovement()
|
|||||||
self thread jump();
|
self thread jump();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// check if need to knife glass
|
||||||
|
else if (bt["surfacetype"] == "glass")
|
||||||
|
{
|
||||||
|
if (i > 1.5)
|
||||||
|
{
|
||||||
|
i = 0;
|
||||||
|
self thread knife();
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// check if need to crouch
|
// check if need to crouch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user