Remove "z" from "vertex_t"
- Jan 04, 2020
This removes vertex_t
's z
variable, as it is unnecessary. The only occurrence across the entire codebase for this variable was a hack used by the rope hang snapping behavior; this now uses vector3_t
for the necessary calculations. P_ClosestPointOnLine3D()
was also adapted to make use of vector3_t. (A similar function, FV3_ClosestPointOnLine()
, is meant to have the same functionality, but the math there fails, possibly due to fixed point overflows, and therefore P_ClosestPointOnLine3D()
was kept and adapted for this purpose.)
Adapt P_ClosestPointOnLine3D() to be much like FV3_ClosestPointOnLine() and use vector3_t's as args, save for the hypotenuse calculation, which remains the same; the output should be the same as before. Adapt the rope hang snapping to the new function's form.