diff --git a/code/botlib/be_aas_entity.c b/code/botlib/be_aas_entity.c index 02699bde..c78f9e71 100644 --- a/code/botlib/be_aas_entity.c +++ b/code/botlib/be_aas_entity.c @@ -390,9 +390,9 @@ int AAS_NearestEntity(vec3_t origin, int modelindex) ent = &aasworld.entities[i]; if (ent->i.modelindex != modelindex) continue; VectorSubtract(ent->i.origin, origin, dir); - if (abs(dir[0]) < 40) + if (fabsf(dir[0]) < 40) { - if (abs(dir[1]) < 40) + if (fabsf(dir[1]) < 40) { dist = VectorLength(dir); if (dist < bestdist) diff --git a/code/botlib/be_aas_move.c b/code/botlib/be_aas_move.c index c42b6cca..9ce95c6c 100644 --- a/code/botlib/be_aas_move.c +++ b/code/botlib/be_aas_move.c @@ -168,7 +168,7 @@ int AAS_AgainstLadder(vec3_t origin) //get the plane the face is in plane = &aasworld.planes[face->planenum ^ side]; //if the origin is pretty close to the plane - if (abs(DotProduct(plane->normal, origin) - plane->dist) < 3) + if (fabsf(DotProduct(plane->normal, origin) - plane->dist) < 3) { if (AAS_PointInsideFace(abs(facenum), origin, 0.1f)) return qtrue; } //end if diff --git a/code/botlib/be_aas_reach.c b/code/botlib/be_aas_reach.c index 379948aa..62acd477 100644 --- a/code/botlib/be_aas_reach.c +++ b/code/botlib/be_aas_reach.c @@ -2465,8 +2465,8 @@ int AAS_Reachability_Ladder(int area1num, int area2num) VectorMA(area1point, -32, dir, area1point); VectorMA(area2point, 32, dir, area2point); // - ladderface1vertical = abs(DotProduct(plane1->normal, up)) < 0.1; - ladderface2vertical = abs(DotProduct(plane2->normal, up)) < 0.1; + ladderface1vertical = fabsf(DotProduct(plane1->normal, up)) < 0.1; + ladderface2vertical = fabsf(DotProduct(plane2->normal, up)) < 0.1; //there's only reachability between vertical ladder faces if (!ladderface1vertical && !ladderface2vertical) return qfalse; //if both vertical ladder faces @@ -2474,7 +2474,7 @@ int AAS_Reachability_Ladder(int area1num, int area2num) //and the ladder faces do not make a sharp corner && DotProduct(plane1->normal, plane2->normal) > 0.7 //and the shared edge is not too vertical - && abs(DotProduct(sharededgevec, up)) < 0.7) + && fabsf(DotProduct(sharededgevec, up)) < 0.7) { //create a new reachability link lreach = AAS_AllocReachability(); @@ -2599,7 +2599,7 @@ int AAS_Reachability_Ladder(int area1num, int area2num) if (face2->faceflags & FACE_LADDER) { plane2 = &aasworld.planes[face2->planenum]; - if (abs(DotProduct(plane2->normal, up)) < 0.1) break; + if (fabsf(DotProduct(plane2->normal, up)) < 0.1) break; } //end if } //end for //if from another area without vertical ladder faces diff --git a/code/botlib/be_ai_move.c b/code/botlib/be_ai_move.c index 0c4de348..42232d65 100644 --- a/code/botlib/be_ai_move.c +++ b/code/botlib/be_ai_move.c @@ -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"); diff --git a/code/tools/asm/q3asm.c b/code/tools/asm/q3asm.c index 54c6ab1e..8be0124b 100644 --- a/code/tools/asm/q3asm.c +++ b/code/tools/asm/q3asm.c @@ -1644,3 +1644,4 @@ Motivation: not wanting to scrollback for pages to find asm error. return errorCount; } +