From: <hik...@us...> - 2013-02-07 21:49:44
|
Revision: 12460 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=12460&view=rev Author: hikerstk Date: 2013-02-07 21:49:38 +0000 (Thu, 07 Feb 2013) Log Message: ----------- Some adjustments to steering curve. Modified Paths: -------------- main/trunk/src/input/wiimote_manager.cpp Modified: main/trunk/src/input/wiimote_manager.cpp =================================================================== --- main/trunk/src/input/wiimote_manager.cpp 2013-02-06 22:29:19 UTC (rev 12459) +++ main/trunk/src/input/wiimote_manager.cpp 2013-02-07 21:49:38 UTC (rev 12460) @@ -173,7 +173,11 @@ //const float angle = wiimote_to_joystick * m_wiimote_handle->orient.pitch; // --- Quadratic response version --- - const float normalized_angle = -m_wiimote_handle->orient.pitch / UserConfigParams::m_wiimote_max; + float normalized_angle = -m_wiimote_handle->orient.pitch / UserConfigParams::m_wiimote_max; + if(normalized_angle<-1.0f) + normalized_angle = -1.0f; + else if(normalized_angle>1.0f) + normalized_angle = 1.0f; // Shape the curve that determines steering depending on wiimote angle. // Linear might be too sensitive around 0, while quadratic is not sensitive // enough - blend between those curves using weight w This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |