When a spin control is at min or max value, pressing the arrow key to
switch to the next nonexiting value executes the callback function. That
is confusing.
Example: 'freelook' is set to 'no'. The user presses left arrow,
switching to the nonexiting value before no. The code handles the
case and resets the current value drom -1 to 0. Nevertheless the
callback is executed and switches 'freelook' from no to yes...
Fix that by not executing the callback when we're at min or max value.
Closes#884.
Changed 6 cvars for stick layout to 1; includes menu option
Axial deadzone replaced with radial one, 6 cvars to 2
Expo different for each thumbstick (1 cvar to 2); sliders included
Expo applied to full joystick vector magnitude, instead of per axis
Deleted "joystick_up" ("updown" function) and its sensitivity
Converted model info from AOS to SOA
All strings allocated dynamically at run-time
New command "playermodels" prints valid models to console
Fixes any bugs that may have existed in the directory search
The issue still exists of undefined behavior if a directory name for a
model exceeds the predefined limits.
This didn't work correctly for multiple reasons:
1. `deltayaw` was wrongly initialized for the pusher itself, rather than
for pushed client.
2. `delta_angles[YAW]` is a short, adding plain `amove[YAW]` to it is
wrong.
To support yaw angle rotation properly, delta_angles must be
interpolated on the client. But this is hardly practical as it would
introduce other bugs. Thus, simply remove delta yaw manipulation code
altogether.
Fixes infamous Q2 bug when player standing on a blocked lift gets turned
into wrong direction.
Old sliders required some of their associated cvars to be "extern" so
their current value could be read. That's no longer needed, so they are
"static" now.
"menuslider_s" types, used to create sliders in menus, now are directly
associated to a cvar. That makes possible for them to get their
currently selected value from the cvar, and express their min and max
values in terms of the real values of the cvar.
The rhythm at how they change can be overridden with s->slidestep.
The new sliders also present visually their current value to the user,
making them more useful than before.
"init_delay" was renamed to "updates_countdown", since it's now a "general
purpose" countdown, having also to count the inputs left for gyro calibration,
besides controller initialization.
Reason for the countdown is now explicit, not having to depend if
"gyro_calibration" was true or not to select what was the purpose of the
countdown.
Explanation comment added for gyro initialization on Linux & Mac.
REMINDER: see if SDL2 will keep the difference of gyro readings between Windows
and Linux/Mac for the Switch controllers.