From 5a5f5dec58de9509bddadc32432d400046f440ba Mon Sep 17 00:00:00 2001 From: ineedbots Date: Wed, 19 May 2021 12:20:36 -0600 Subject: [PATCH] Improved mantling --- userraw/maps/mp/bots/_bot_internal.gsc | 23 ++++++++++++++++------- userraw/waypoints | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/userraw/maps/mp/bots/_bot_internal.gsc b/userraw/maps/mp/bots/_bot_internal.gsc index f020997..ab4588f 100644 --- a/userraw/maps/mp/bots/_bot_internal.gsc +++ b/userraw/maps/mp/bots/_bot_internal.gsc @@ -518,6 +518,7 @@ doBotMovement() self endon("death"); FORWARDAMOUNT = 25; + wasMantling = false; for (i = 0;; i+=0.05) { @@ -550,8 +551,15 @@ doBotMovement() // climb through windows if (self isMantling()) + { + wasMantling = true; + self crouch(); + } + else if (wasMantling) + { + wasMantling = false; self stand(); - + } startPos = self.origin + (0, 0, 50); startPosForward = startPos + anglesToForward((0, angles[1], 0)) * FORWARDAMOUNT; @@ -1956,7 +1964,7 @@ movetowards(goal) { self botMoveTo(goal); - if(time > 3.5) + if(time > 3500) { time = 0; if(distanceSquared(self.origin, lastOri) < 128) @@ -1974,19 +1982,20 @@ movetowards(goal) lastOri = self.origin; } - else if(timeslow > 0.75) + else if(timeslow > 0 && (timeslow % 1000) == 0) { 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; - time += 0.05; + time += 50; if(lengthsquared(self getVelocity()) < 1000) - timeslow += 0.05; + timeslow += 50; else timeslow = 0; diff --git a/userraw/waypoints b/userraw/waypoints index 9770210..1d01e47 160000 --- a/userraw/waypoints +++ b/userraw/waypoints @@ -1 +1 @@ -Subproject commit 9770210fc2f3a9466e7711dbb46f32ac78264faf +Subproject commit 1d01e479169bf36b21cb065c736cddcbefc5622a