From 0693025f683bbb68a05bc66ab5e6381cab4eeb56 Mon Sep 17 00:00:00 2001 From: jeefo Date: Thu, 23 Jul 2015 00:01:09 +0300 Subject: [PATCH] give bot some more time to reach destination so it's should fix problems in de_nuke cloaks --- source/basecode.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/basecode.cpp b/source/basecode.cpp index 1cc8480..d3546ad 100644 --- a/source/basecode.cpp +++ b/source/basecode.cpp @@ -5814,22 +5814,22 @@ float Bot::GetEstimatedReachTime (void) float distance = (waypoint->GetPath (m_prevWptIndex[0])->origin - m_currentPath->origin).GetLength (); // caclulate estimated time - if (pev->maxspeed <= 0.0) - estimatedTime = 4.0 * distance / 240.0; + if (pev->maxspeed <= 0.0f) + estimatedTime = 4.0f * distance / 240.0f; else - estimatedTime = 4.0 * distance / pev->maxspeed; + estimatedTime = 4.0f * distance / pev->maxspeed; // check for special waypoints, that can slowdown our movement if ((m_currentPath->flags & FLAG_CROUCH) || (m_currentPath->flags & FLAG_LADDER) || (pev->button & IN_DUCK)) - estimatedTime *= 2.0; + estimatedTime *= 3.0f; // check for too low values if (estimatedTime < 1.0f) estimatedTime = 1.0f; // check for too high values - if (estimatedTime > 5.0f) - estimatedTime = 5.0f; + if (estimatedTime > 8.0f) + estimatedTime = 8.0f; } return estimatedTime; }