mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-23 06:15:43 +00:00
Improved mantling
This commit is contained in:
parent
56bf257976
commit
5a5f5dec58
@ -518,6 +518,7 @@ doBotMovement()
|
|||||||
self endon("death");
|
self endon("death");
|
||||||
|
|
||||||
FORWARDAMOUNT = 25;
|
FORWARDAMOUNT = 25;
|
||||||
|
wasMantling = false;
|
||||||
|
|
||||||
for (i = 0;; i+=0.05)
|
for (i = 0;; i+=0.05)
|
||||||
{
|
{
|
||||||
@ -550,8 +551,15 @@ doBotMovement()
|
|||||||
|
|
||||||
// climb through windows
|
// climb through windows
|
||||||
if (self isMantling())
|
if (self isMantling())
|
||||||
|
{
|
||||||
|
wasMantling = true;
|
||||||
|
self crouch();
|
||||||
|
}
|
||||||
|
else if (wasMantling)
|
||||||
|
{
|
||||||
|
wasMantling = false;
|
||||||
self stand();
|
self stand();
|
||||||
|
}
|
||||||
|
|
||||||
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;
|
||||||
@ -1956,7 +1964,7 @@ movetowards(goal)
|
|||||||
{
|
{
|
||||||
self botMoveTo(goal);
|
self botMoveTo(goal);
|
||||||
|
|
||||||
if(time > 3.5)
|
if(time > 3500)
|
||||||
{
|
{
|
||||||
time = 0;
|
time = 0;
|
||||||
if(distanceSquared(self.origin, lastOri) < 128)
|
if(distanceSquared(self.origin, lastOri) < 128)
|
||||||
@ -1974,19 +1982,20 @@ movetowards(goal)
|
|||||||
|
|
||||||
lastOri = self.origin;
|
lastOri = self.origin;
|
||||||
}
|
}
|
||||||
else if(timeslow > 0.75)
|
else if(timeslow > 0 && (timeslow % 1000) == 0)
|
||||||
{
|
{
|
||||||
self thread doMantle();
|
self thread doMantle();
|
||||||
}
|
}
|
||||||
else if(timeslow > 1.5)
|
else if(time > 2500)
|
||||||
{
|
{
|
||||||
self crouch();
|
if(distanceSquared(self.origin, lastOri) < 128)
|
||||||
|
self crouch();
|
||||||
}
|
}
|
||||||
|
|
||||||
wait 0.05;
|
wait 0.05;
|
||||||
time += 0.05;
|
time += 50;
|
||||||
if(lengthsquared(self getVelocity()) < 1000)
|
if(lengthsquared(self getVelocity()) < 1000)
|
||||||
timeslow += 0.05;
|
timeslow += 50;
|
||||||
else
|
else
|
||||||
timeslow = 0;
|
timeslow = 0;
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 9770210fc2f3a9466e7711dbb46f32ac78264faf
|
Subproject commit 1d01e479169bf36b21cb065c736cddcbefc5622a
|
Loading…
x
Reference in New Issue
Block a user