Commit graph

20882 commits

Author SHA1 Message Date
GenericHeroGuy
b3ce5c8a85 Prettier default controls table
See if you can spot the new default controls I added :^)
(i needed an excuse to put a KEY_AXIS1 in there in case these get updated)
2025-03-13 00:44:03 +01:00
GenericHeroGuy
b5be67d8d3 Always convert Item presses to backspace in M_Responder 2025-03-13 00:17:54 +01:00
GenericHeroGuy
0859c8a710 Use defaults behavior instead of hardcoded keys for most controls
Same behavior if you leave the controls at their defaults or unbind them,
but now if you bind them to some other key then the default keys they use
are freed up (a bit jank tho for screenshot keys...)
2025-03-13 00:11:28 +01:00
GenericHeroGuy
20d11760bb Whoops, turn smoothing doesn't apply to sidemove 2025-03-11 23:46:55 +01:00
GenericHeroGuy
bfcee5d6c2 Remove menu defaults/backup code from G_PlayerInputAnalog
Nothing except the extra event loop in CL_ServerConnectionTicker uses this,
because we still use old menus with events rather than inputs,
and that has its own system for default controls.

The third argument is now 'digital' to get rid of that pesky global boolean
2025-03-11 22:21:45 +01:00
GenericHeroGuy
f547af9992 Simplify gamepad axis code
Yes I intentionally spelled it JOYAXISES to not conflict with the old define
2025-03-11 20:38:37 +01:00
Eidolon
4d65f09eb7 Port Ediolon's SDL GameController work
Basically instantly solved all of the issues that made this branch completely unusable
2025-03-11 20:01:25 +01:00
Sally Coolatta
e1ffc206e7 Finish some unused SDL hat input support to use events rather than polling all of the time 2025-03-11 15:17:51 +01:00
GenericHeroGuy
e669ca6edb Restore turn smoothing in the most horrific way possible 2025-03-11 01:44:25 +01:00
GenericHeroGuy
fb230a27d3 Restore mouse aiming 2025-03-11 00:04:34 +01:00
GenericHeroGuy
e61c43a852 Merge branch 'blankart-dev' into newinput 2025-03-10 23:26:30 +01:00
GenericHeroGuy
c719ad49aa MISSING BRACES AROUND INITIALIZER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
amazing warning spam
2025-03-10 23:19:36 +01:00
GenericHeroGuy
4cf9c7f6b6 Make vertical aiming work again 2025-03-10 23:08:47 +01:00
NepDisk
c6377f884f Update some ACS documentation 2025-03-10 17:19:45 -04:00
NepDisk
8884f7d3c9 Add WumboSpasm to the credits 2025-03-10 15:22:52 -04:00
NepDisk
95750e50e4 Implement MultiItems into capsules/dropped items as well 2025-03-10 15:18:58 -04:00
NepDisk
9d2c895b2a Fix offset for options main status 2025-03-10 14:20:23 -04:00
NepDisk
178ba3b4a6 Fix copy paste mistake 2025-03-10 14:16:22 -04:00
NepDisk
7ad73c040d Add Camera submenu from Saturn 2025-03-10 14:14:07 -04:00
GenericHeroGuy
167414af2f Control setup menu changes
* Gamepad select option now displays the name of your gamepad on the right
* Switch to thin font when bind names are too long
* Reduced margins and shortened some control names to fit longer binds
* Fixed deadzone cvar always being player 1's
* Fixed missing arrows on deadzone cvar (this NEEDS to be a macro...)
* Only accept inputs from the current player's gamepad, shouldn't be a
  problem since your chosen gamepad is displayed now
* Show all 8 instead of 7 gamepads in gamepad select
2025-03-10 18:14:51 +01:00
NepDisk
e8adbfb8b7 Fix typo in namespace code 2025-03-10 12:57:45 -04:00
NepDisk
1935895f88 Remove Unused ACS code and rename POSITION script type 2025-03-10 12:44:21 -04:00
NepDisk
431d504e8d Update ACS code and add playerfinishscript 2025-03-10 12:37:20 -04:00
NepDisk
a7167bfbcd Demo code updating
Still has stuff to resolve but it kinda works now. Bots should turn correctly now but replays that have bots added at the race start don't play for whatever reason. Ghosts have been fixed and no longer crash the game after they end.
2025-03-10 10:40:19 -04:00
GenericHeroGuy
ef1489aa04 Cleanup, fix menu controls and keyboard 2025-03-10 15:06:52 +01:00
toaster
144e967ee5 Rework the entire G_PlayerInputAnalog system.
* Previous control checking flow:
    * Current controller/keyboard (userbound controls).
    * If on a menu:
        * Current controller/keyboard (default controls).
        * All controllers not in use by a player (default controls).
* New control checking flow:
    * Current controller/keyboard (userbound controls).
    * If player 0 and just checked a controller, check keyboard (userbound controls).
    * If on a menu:
        * Check all controllers not in use by a player (userbound controls).
        * If keys are inaccessible/unbound and keybind is necessary to navigate menus, repeat eveyrhting with default controls.
* Instead of duplicated code, control the flow in a finer fashion.
* Now able to detect if gamepad inputs are possible to recieve (via checking deviceID), instead of assuming they are.
* If a keybind is set but inaccessible by the above metric, make it flash on the Profile Controls screen.
* Fix out-of-order key mappings for a given bind being invisible on the Profile Controls menu.
2025-03-10 11:04:00 +01:00
NepDisk
bda7d26a0f Port basic lap anticheat for new waypoints from RR 2025-03-09 20:03:10 -04:00
NepDisk
58e243a20c Don't Do levelstart or Map Music in Titlemap 2025-03-09 11:22:00 -04:00
NepDisk
8ed52a3a9d G_Ticker fixes from RR
ab0094b8d0 95216563a6
2025-03-09 11:09:01 -04:00
NepDisk
033b65a70b Move Waypoint check code to P_DeathThink 2025-03-09 09:30:21 -04:00
NepDisk
da01a91852 Break from loop when valid target is found 2025-03-08 21:09:11 -05:00
NepDisk
7c65095671 yen 2025-03-08 15:40:30 -05:00
NepDisk
d7162bed71 implement safe guards for softlock respawns in New Waypoints
if you fail to respawn properly (die while respawning) you get placed at the next waypoint. Code was also adjusted so the next waypoint can't be the same as your current one if you are detected as going backwards, helps on turns that sometimes face you towards the previous waypoint. Respawning angle for both respawn fallbacks now gets the angle by comparing x and y of the current waypoint and next waypoint to guarntee you are facing the correct direction
2025-03-08 15:37:14 -05:00
NepDisk
dfab6cc945 Add customcutscene to F_BlanStartCredits 2025-03-08 13:03:56 -05:00
NepDisk
8ee3624b27 Fix kart credits crash 2025-03-08 11:39:57 -05:00
NepDisk
94b8c815bd specfiy which is which 2025-03-08 11:05:51 -05:00
NepDisk
195c21c659 Add back missing titlescreen sound 2025-03-08 11:03:37 -05:00
NepDisk
b9ad30c9e2 Add BlanKart Credits and append new scene to intro 2025-03-08 11:00:54 -05:00
NepDisk
8df4f4966b Fix goof in turn check 2025-03-07 20:32:14 -05:00
Sally Coolatta
a0348420f7 Fix menu multiplayer breaking again 2025-03-08 01:00:57 +01:00
Sally Coolatta
a934e09b0c Properly implement joystick axes
NOW it's fully navigable with controller
2025-03-08 01:00:56 +01:00
Sally Coolatta
9b3067a7a2 Fix control saving 2025-03-08 00:56:53 +01:00
Sally Coolatta
11bd4c453e Almost multiplayer char select
For some reason gamepads have not been registering buttons for a while, which makes this pretty hard to continue. Not sure if it's to do with how the menu cmd is generated, or something deeper in the SDL code.
2025-03-08 00:21:37 +01:00
Sally Coolatta
0a98ca63ab First pass on character select device select
Ultra mega hacked in, by saving all "discarded" joysticks to an array so they don't get totally closed & we can still poll them. Events now properly send the device number instead of the player number, which means we can store all controllers pressing buttons, and thus, can detect when ANY controller is pressing anything, and THUS we can make the character select work like we wanted to :V

Did not bother fixing any of the bugs, however. First of all, the opening menus do not properly fallback to default controls. Yet again, we may need a more robust system -- storing all keys from gamekeydown separately? Additionally it seems like when I input gamepad it makes me use keyboard anyway, so I think something fishy is up.

(G: finally, a commit that mostly survived... deviceResponding is useless
    for us right now but might as well keep it. maybe easier assignment on
    the multiplayer setup menu in the future?)
2025-03-07 23:44:59 +01:00
NepDisk
65f992fda8 Oops 2025-03-07 17:33:31 -05:00
NepDisk
fbb7335011 Revert "Fix Bubble Shield duplicate collisions"
This doesn't really apply to us since we don't have hitlag and it causes problems.

This reverts commit b048467aa2.
2025-03-07 17:30:53 -05:00
GenericHeroGuy
d286ff3bdf Ok, get this outta here already 2025-03-07 22:47:50 +01:00
NepDisk
b4b9a250d4 Merge branch 'blankart-dev' into newinput 2025-03-07 12:56:51 -05:00
GenericHeroGuy
84850ba8a3 Update input handling in menus to use key bindings (port-ish of f17b9484)
G_GetControlForKey -> G_ControlBoundToKey, to make it usable everywhere
2025-03-07 18:12:59 +01:00
NepDisk
bdbfeaf1ac More uses K_GetKartButtons 2025-03-07 12:12:52 -05:00