mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-16 04:32:25 +00:00
use std::abs in Map::FindClosestZ
This commit is contained in:
parent
3efc925264
commit
f06a9b3dce
@ -163,7 +163,7 @@ float Map::FindClosestZ(glm::vec3 &start, glm::vec3 *result) const {
|
||||
to.z = -BEST_Z_INVALID;
|
||||
hit = imp->rm->raycast((const RmReal*)&from, (const RmReal*)&to, (RmReal*)result, nullptr, &hit_distance);
|
||||
if (hit) {
|
||||
if (abs(from.z - result->z) < abs(ClosestZ - from.z))
|
||||
if (std::abs(from.z - result->z) < std::abs(ClosestZ - from.z))
|
||||
return result->z;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user