From c152cf02a483724846d6068f3ea5aaee406bb1ef Mon Sep 17 00:00:00 2001 From: Garux Date: Thu, 19 Oct 2017 00:27:46 +0300 Subject: [PATCH] * round AP and Valve220 rotation values to f.xx instead of int --- radiant/brush_primit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/radiant/brush_primit.cpp b/radiant/brush_primit.cpp index 227de2a4..b2a707a6 100644 --- a/radiant/brush_primit.cpp +++ b/radiant/brush_primit.cpp @@ -379,7 +379,8 @@ void Texdef_Assign( texdef_t& td, const float* hShift, const float* vShift, cons } if( rotation ){ td.rotate = *rotation; - td.rotate = static_cast( float_to_integer( td.rotate ) % 360 ); + //td.rotate = static_cast( float_to_integer( td.rotate * 100.f ) % 36000 ) / 100.f; + td.rotate = fmod( td.rotate, 360.f ); } } @@ -405,7 +406,7 @@ void Texdef_Scale( texdef_t& td, float s, float t ){ void Texdef_Rotate( texdef_t& td, float angle ){ td.rotate += angle; - td.rotate = static_cast( float_to_integer( td.rotate ) % 360 ); + td.rotate = fmod( td.rotate, 360.f ); } #if 0 // NOTE: added these from Ritual's Q3Radiant