From eca9b4981b091e49ee4d4c2c711efce1bdbed2d0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 19 Nov 2009 07:21:10 +0000 Subject: [PATCH] - fixed the R_PointToAngle fix from r1985. SVN r1989 (trunk) --- src/r_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_main.cpp b/src/r_main.cpp index e960c7c5c..b528373ee 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -328,7 +328,7 @@ angle_t R_PointToAngle2 (fixed_t x1, fixed_t y1, fixed_t x, fixed_t y) // we have to use the slower but more precise floating point atan2 function here. // (use quickertoint to speed this up because the CRT's conversion is rather slow and // this is used in time critical code.) - return quickertoint((float)(atan2f(float(y-viewy), float(x-viewx)) * (ANGLE_180/M_PI))); + return quickertoint((float)(atan2f(float(y), float(x)) * (ANGLE_180/M_PI))); } }