minor bug fixes, minor diagnostics tweaks

This commit is contained in:
tmj-fstate
2019-12-17 14:50:04 +01:00
parent 57b88ec64a
commit 0ebc7e282f
10 changed files with 57 additions and 48 deletions

View File

@@ -464,9 +464,22 @@ gamepad_input::process_axes() {
if( inputtype == input_type::value_invert ) {
param *= -1.0;
}
// special case, viewturn receives some param scaling
if( boundcommand1 == user_command::viewturn ) {
}
// scale passed value according to command type
switch( boundcommand1 ) {
case user_command::viewturn: {
param *= 10.0 * ( Timer::GetDeltaRenderTime() * 60.0 );
break;
}
case user_command::movehorizontal:
case user_command::movehorizontalfast: {
// these expect value in -1:1 range
break;
}
default: {
// commands generally expect their parameter to be in 0:1 range
param = param * 0.5 + 0.5;
break;
}
}
break;