Commit graph

3530 commits

Author SHA1 Message Date
Jaime Moreira
0417bc1023 Sloped axial deadzone added
2 cvars to change it, 1 per stick
Provides the "snap-to-axis" feeling of the previous axial deadzone
2022-08-24 17:48:33 -04:00
Jaime Moreira
f3fcf3fc24 Joystick handling refactored for precision
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
2022-08-24 12:30:39 -04:00
Jaime Moreira
301a2ce735 Disable gyro when game is paused
Changed text on controller menu for lower resolutions
Appropiate data type for updates_countdown
2022-08-23 18:36:33 -04:00
apartfromtime
45f4e1860c Check for null and free correct number of directories
Potential errors.
2022-08-21 11:31:09 +10:00
apartfromtime
243d4193ee Add player models command
Update documentation.
2022-08-19 16:07:12 +10:00
apartfromtime
4c7ab467f8 Dangling pointer on free
Won't need the guard pointer.
2022-08-19 16:05:21 +10:00
apartfromtime
64ac8c3183 Zero list elements
For in check for "NULL" cases, if free succeeds you probably want to
clear the pointer bits.
2022-08-19 15:26:53 +10:00
apartfromtime
73427b77a2 Convert model info from AOS to SOA
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.
2022-08-19 15:22:22 +10:00
Andrey Nazarov
fe15bf2335 Remove broken pusher delta yaw manipulation.
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.
2022-08-16 01:43:47 +03:00
apartfromtime
acea0c54d9 Remove player skin box bounds check introduced in #866
Failure produces black screen.
2022-08-13 10:09:05 +10:00
apartfromtime
e87f025d13 Merge branch 'master' into ui 2022-08-13 10:08:02 +10:00
Yamagi
98a4522b1b
Merge pull request #865 from protocultor/cycleweap_quick
Faster weapon switching with 'cycleweap'
2022-08-07 18:21:30 +02:00
Yamagi
ef68b3d8d5
Merge pull request #864 from protocultor/sliders
Enhanced sliders
2022-08-07 18:19:20 +02:00
apartfromtime
de051f248c Make skin icon bitmap part of the player setup menu
Adding menu bitmaps makes this possible.
Bounds check on skin box current value.
2022-08-06 13:20:21 +10:00
Jaime Moreira
7f689f649c Faster weapon switching with 'cycleweap'
Allows to skip elements on the weapon list by tapping the same bound key
2022-08-01 14:31:26 -04:00
Jaime Moreira
5f59b752c0 Scope fixed for some cvars
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.
2022-07-30 14:29:38 -04:00
Jaime Moreira
6c4866995b Enhanced sliders for menus
"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.
2022-07-30 14:23:33 -04:00
Yamagi
f9ab797c7c
Merge pull request #863 from devnexen/attr_malloc
Hunk_Begin/Alloc attr malloc addition.
2022-07-30 10:20:49 +02:00
David Carlier
cfd8cd94e5 Hunk_Begin/Alloc attr malloc addition. 2022-07-23 14:05:30 +01:00
Yamagi
90eb2f394d
Merge pull request #862 from devnexen/glrenderer_drawparticles_sig
R_DrawParticles2 signature slight change fixing build warning.
2022-07-22 10:14:37 +02:00
Yamagi
2cb98b7a1d
Merge pull request #857 from protocultor/gyro_bluetooth
Gyro aiming through Bluetooth for PS4 & PS5 controllers
2022-07-22 09:53:00 +02:00
David Carlier
136222d4d7 R_DrawParticles2 signature slight change fixing build warning. 2022-07-20 22:54:42 +01:00
Yamagi
aaffcf81b0
Merge pull request #861 from devnexen/client_pingserverfix
client ping server fix unitialized field.
2022-07-17 12:24:35 +02:00
Yamagi
91fd76ca5d
Merge pull request #860 from apartfromtime/ui
UI code maintenance
2022-07-17 12:24:20 +02:00
David Carlier
024d065f80 client ping server fix unitialized field. 2022-07-16 19:44:30 +01:00
apartfromtime
affea5aef3 Remove menu number of slots property
Remove unused and dead code.
2022-07-15 12:51:01 +10:00
apartfromtime
c0bad27f43 Pre-calculate x, y offsets
Make code easier to read.
2022-07-15 12:47:41 +10:00
Jaime Moreira
0bb2bf0cea Increased sensitivity range for controllers on menu 2022-07-07 23:43:02 -04:00
Jaime Moreira
1fa432f695 Gyro aiming through Bluetooth for PS4 & PS5 controllers 2022-07-05 19:15:10 -04:00
Yamagi
95eabefec9
Merge pull request #856 from apartfromtime/ui
Iterate once through menu item list
2022-06-25 17:28:40 +02:00
Yamagi
d3f6af18c1
Merge pull request #855 from devnexen/download_connect_timeout
client download, sets a sane connection timeout, the default being wa…
2022-06-25 17:24:34 +02:00
apartfromtime
c03f4fd094 Iterate once through menu item list
Avoids any infinite loop cases.
2022-06-25 14:17:58 +10:00
David Carlier
a635721c50 client download, sets a sane connection timeout, the default being way to high. 2022-06-24 20:49:23 +01:00
Yamagi
c6f6a17176
Merge pull request #849 from protocultor/gyro_aiming
Gyro aiming
2022-06-17 13:07:25 +02:00
Jaime Moreira
35495fb6f2 Readability improved for gyro calibration & controller hotplug code
"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.
2022-06-14 16:16:47 -04:00
Yamagi
ca70f8e679
Merge pull request #851 from devnexen/download_limits
client download, adding two new cvar to have the ability to set
2022-06-13 08:08:52 +02:00
Daniel Gibson
86811a4c24 Fix fallback when window couldn't be created because renderer is unsupported
For example, on Windows with AMDs drivers, GLES3 isn't supported,
so CreateSDLWindow() will fail. We should just try the regular GL3
renderer then instead of exiting with Com_Error()

Also make (Windows') Sys_Error() print to stdout (in addition to stderr),
so errors end up in stdout.txt as well (like all other messages).
2022-06-11 17:57:29 +02:00
Yamagi
a1dddaede3
Merge pull request #846 from devnexen/vla_0_fix
GL1 renderer fix VLA with no size cases,
2022-06-11 16:40:48 +02:00
Yamagi
a8ae79c6ab Remove twi unsused declarations. 2022-06-11 16:40:15 +02:00
Yamagi
041f808ff4
Merge pull request #850 from apartfromtime/ui
Infinite loop in bind menu fix
2022-06-11 16:35:58 +02:00
David CARLIER
a01309235b client download, adding two new cvar to have the ability to set
a threshold to abort the download if a certain transfer rate is too low.
Disabled by default.
2022-06-11 13:41:24 +01:00
Jaime Moreira
df399576a2 Gyro normalization value in Windows improved
SDL2 provides different gyro readings between Windows and Linux/Mac for
the Switch Pro Controller. To keep the natural sensitivity scale intact
(in-game turn = controller turn), the normalization factor is handled
differently by platform, at least for now.
Also, now giving info when there's no gyro sensor available/detected.
And green light for the DualShock 4, because why not :)
2022-06-10 22:31:24 -04:00
apartfromtime
353295d0c7 Infinite loop in bind menu fix
Bug introduced in #841.
Added QMF_INACTIVE.
QMF_INACTIVE menu items are skipped.
2022-06-11 09:17:49 +10:00
Jaime Moreira
077d861a57 Gyro aiming menu options
"Gyro mode", "axis to turn" and "sensitivity" grouped with calibration.
2022-06-07 09:49:47 -04:00
Jaime Moreira
f12b759feb Gyro aiming configuration cvars
Cvar to choose between "yaw" (0) or "roll" (1) axis of the controller
to turn (change your yaw) in-game.
Cvars to change pitch and yaw gyro sensitivities.
Updated cvar documentation with new section "Game Controller".
2022-06-07 09:34:45 -04:00
Jaime Moreira
d3da95cfc8 Gyro aiming implementation
SDL 2.0.16 and a controller with a gyroscope required to make it work.
Manual calibration of the gyro sensor is needed to avoid "drifting"; a menu
option to do it is included.
New cvar 'gyro_mode' for mode of operation, and to assign action to the new
"+gyroaction" button: disable or enable the gyro.
2022-06-07 09:24:08 -04:00
Yamagi
a80f5b6cd7
Merge pull request #844 from protocultor/inventory
Inventory screen keys/buttons display fix
2022-06-07 14:22:23 +02:00
Yamagi
1cd347beb7
Merge pull request #843 from devnexen/fbsd_build_warnings
freebsd/clang and server only warnings build fix
2022-06-07 14:20:59 +02:00
Yamagi
82a280bc40
Merge pull request #841 from apartfromtime/ui
Add menu bitmap support
2022-06-07 14:19:26 +02:00
Yamagi
09d6dfcd92
Merge pull request #840 from Dremor8484/Dremor8484-aimfix-doublebarrel_shotgun
Update weapon.c
2022-06-07 14:18:51 +02:00