[botlib] Use floating point absolute value rather than truncate to integer
This commit is contained in:
1 parent
9a5add2b60
commit
18d6c8fda2
5 files changed
+9
-8
No files matched your search
@@ -2054,7 +2054,7 @@ bot_moveresult_t BotTravel_Elevator(bot_movestate_t *ms, aas_reachability_t *rea
|
||||
botimport.Print(PRT_MESSAGE, "bot on elevator\n");
|
||||
#endif //DEBUG_ELEVATOR
|
||||
//if vertically not too far from the end point
|
||||
if (abs(ms->origin[2] - reach->end[2]) < sv_maxbarrier->value)
|
||||
if (fabsf(ms->origin[2] - reach->end[2]) < sv_maxbarrier->value)
|
||||
{
|
||||
#ifdef DEBUG_ELEVATOR
|
||||
botimport.Print(PRT_MESSAGE, "bot moving to end\n");
|
||||
|
||||
Reference in new issue
Block a user