Bug Tracker – Attachment #569: scale joystick values to allow full range of movement for bug #1269

View | Details | Raw Unified | Return to bug 1269
Collapse All | Expand All

(-)a/client/src/g_game.cpp (-2 / +2 lines)
Lines 405-411 void G_BuildTiccmd(ticcmd_t *cmd) Link Here
405
	}
405
	}
406
406
407
	// Joystick analog strafing -- Hyper_Eye
407
	// Joystick analog strafing -- Hyper_Eye
408
	side += (int)(((float)joystrafe / (float)SHRT_MAX) * sidemove[speed]);
408
	side += (int)(((float)joystrafe / (float)SHRT_MAX / 0.7071067811865476) * forwardmove[speed]);
409
409
410
	if (Actions[ACTION_LOOKUP])
410
	if (Actions[ACTION_LOOKUP])
411
		look += lookspeed[speed];
411
		look += lookspeed[speed];
Lines 503-509 void G_BuildTiccmd(ticcmd_t *cmd) Link Here
503
	}
503
	}
504
	else
504
	else
505
	{
505
	{
506
		forward -= (int)(((float)joyforward / (float)SHRT_MAX) * forwardmove[speed]);
506
		forward -= (int)(((float)joyforward / (float)SHRT_MAX / 0.7071067811865476) * forwardmove[speed]);
507
	}
507
	}
508
508
509
	if ((Actions[ACTION_MLOOK]) || (cl_mouselook && sv_freelook))
509
	if ((Actions[ACTION_MLOOK]) || (cl_mouselook && sv_freelook))

Return to bug 1269