engine: client: rewrite stupid comma separated single-line operations into more sane code

This commit is contained in:
Alibek Omarov 2024-10-30 22:01:41 +03:00
parent 6bdb3f6ea1
commit 9e1908fc6f

View file

@ -1674,7 +1674,10 @@ static void Touch_Motion( touchEventType type, int fingerID, float x, float y, f
if( fingerID == touch.look_finger ) if( fingerID == touch.look_finger )
{ {
if( touch.precision ) if( touch.precision )
dx *= touch_precise_amount.value, dy *= touch_precise_amount.value; {
dx *= touch_precise_amount.value;
dy *= touch_precise_amount.value;
}
if( touch_nonlinear_look.value ) if( touch_nonlinear_look.value )
{ {
@ -1704,7 +1707,8 @@ static void Touch_Motion( touchEventType type, int fingerID, float x, float y, f
return; return;
// accumulate // accumulate
touch.yaw -= dx * touch_yaw.value, touch.pitch += dy * touch_pitch.value; touch.yaw -= dx * touch_yaw.value;
touch.pitch += dy * touch_pitch.value;
} }
} }