Commit 93fdcdec authored by Daniel Buckmaster's avatar Daniel Buckmaster

Compare to cosine of angle, not angle.

parent 27252b08
......@@ -182,9 +182,9 @@ void GuiShapeNameHud::onRender( Point2I, const RectI &updateRect)
cam.getColumn(3, &camPos);
cam.getColumn(1, &camDir);
F32 camFov;
camFov = mDegToRad(camFov) / 2;
F32 camFovCos;
camFovCos = mCos(mDegToRad(camFovCos) / 2);
// Visible distance info & name fading
F32 visDistance = gClientSceneGraph->getVisibleDistance();
......@@ -236,7 +236,7 @@ void GuiShapeNameHud::onRender( Point2I, const RectI &updateRect)
// projection and box test.
F32 dot = mDot(shapeDir, camDir);
if (dot < camFov)
if (dot < camFovCos)
// Test to see if it's behind something, and we want to
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment