Commit graph

20842 commits

Author SHA1 Message Date
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
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
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
NepDisk
ec6a3d2716 Small turn code refactor 2025-03-07 11:50:10 -05:00
GenericHeroGuy
7740b0dccd Add back joywait
For some reason I thought this didn't do anything kek
2025-03-07 13:11:42 +01:00
GenericHeroGuy
26ca5be4e0 Fix replay freecam by reusing G_BuildTiccmd 2025-03-07 01:39:10 +01:00
GenericHeroGuy
f419ccee57 New input handling (port of cd8862f0)
More or less a port with gamecontrols left untouched.

Some notable differences:
* ev_joystick now has a separate data1 for each axis, rather than having you
  check which of data2/3 is INT32_MAX and which one isn't
  (pissed me off when updating menu code...)
* Gutted the 1.6 upgrade code, since we're not upgrading from anything :P
* G_GetControlForKey, a helper for menu code
* Turn smoothing code left unused as a reminder to fix it
* Various small fixes so this commit is playable and doesn't segfault

Menu changes:
* Max 4 binds, joystick axes are now bindable like any other button
* The gamepad options submenu has been replaced by its two remaining options
  after the removal of axis cvars (gamepad select and deadzone)

See cd8862f0's message for more details
2025-03-07 00:05:35 +01:00
NepDisk
3e68d31e63 Drop droptarget a point in odds 2025-03-06 13:12:35 -05:00
GenericHeroGuy
403f7edc85 Don't run A_RockSpawn with zero tics in Kart maps 2025-03-05 01:09:49 +01:00
NepDisk
0a0c468ac3 Fix Distribution debugger 2025-03-04 16:01:39 -05:00
NepDisk
a63c301dea Remove flameshield turn buff for drifitng 2025-03-04 15:41:12 -05:00
Indev
5a0303d649 Only add command to history if it differs from previous one 2025-03-04 15:14:23 -05:00
NepDisk
5b2bf450c0 Adjust Airfailsafe conditions 2025-03-04 07:53:40 -05:00
GenericHeroGuy
41f2bbcb1e Okay, let's not break UDMF speedpads
Change binary conversion to 2.2 behavior, but ignore it and use
linedef length directly for kart maps
2025-03-04 01:57:03 +01:00
GenericHeroGuy
6fdfeb42a0 Store speed pad speed with full precision 2025-03-04 01:07:57 +01:00
GenericHeroGuy
918c9ec0a1 Fix P_ButteredSlope's wrong behavior 2025-03-04 01:03:31 +01:00
NepDisk
47d921a532 Fix kartstuff in stats 2025-03-03 16:52:16 -05:00
GenericHeroGuy
2aa52a15b6 Revert P_CheckPosition's MF_NOCLIP behavior
Seems to have been unintenionally yoinked in 122b2696,
and it causes an obnoxious amount of lag for grindrails
2025-03-03 22:26:07 +01:00
GenericHeroGuy
8a51847fb1 Y'know what? Just make these functions one-based, sheesh 2025-03-03 21:18:07 +01:00
NepDisk
037a75df08 Match is battle 2025-03-03 13:49:16 -05:00
NepDisk
96ce824155 Fix BT_FORWARD/BT_BACKWARD not being applied on sticks 2025-03-03 13:33:11 -05:00
GenericHeroGuy
1025ac59bd Translate MapLoad/MapChange and implicit gamemap argument 2025-03-03 19:03:36 +01:00
NepDisk
ec913108b9 Restore old offroad behaviour 2025-03-03 12:49:45 -05:00
NepDisk
678ce10475 Fix some P_AllowMobjSpawn conditions 2025-03-03 08:30:36 -05:00
GenericHeroGuy
ec279abe4a And finally... break some more limits
Good luck to whoever wants to deal with the raw texture numbers in
that Liminal Landscape HUD hook that changes sidedef textures
(I had no idea that was even possible...)
2025-03-03 02:39:53 +01:00
GenericHeroGuy
5259bab788 'Fix' Mauro Mania static effect (by shuffling video flags) 2025-03-03 02:29:50 +01:00
GenericHeroGuy
ebea1395d4 Map number compatmode 2025-03-03 01:28:51 +01:00
NepDisk
14b758f84a Make this the same between new and old odds systems 2025-03-02 11:45:50 -05:00
NepDisk
b0bbf07bdb Custom gametype and gametyperules additions
Many new options have been added.

You can now specify "menucolor" when creating a gametype. This accepts a V_ colorchar flag (IE V_PURPLEMAP) and will be used to color hud elements in menus and on the HUD.

Encore is now controlled by GTR_ENCORE. This allows for custom modes that don't accept encore.

Itemodds are now controlled by GTR_RACEODDS and GTR_BATTLEODDS respectively. If neither is specified on gametype creation, completely random items will be rolled.

General GTR_FREEROAM adjustments
2025-03-02 11:41:30 -05:00
NepDisk
9458cbbaa2 Accurate Racestart 2025-03-02 08:18:48 -05:00
NepDisk
8c67e163bc Drain startboost timer in the air again 2025-03-02 08:13:32 -05:00
NepDisk
8d36a95f7e Use old hyudoro duration 2025-03-02 08:06:15 -05:00
NepDisk
76bffc3d60 Prevent invin time from stacking 2025-03-02 08:04:50 -05:00
NepDisk
8b5b674364 Fix flameshield collide 2025-03-01 11:01:29 -05:00
NepDisk
b3851134c1 fix logic issue 2025-03-01 10:20:43 -05:00
NepDisk
b06b6ade9e Give omega an extra tic in a better way 2025-02-28 22:00:48 -05:00
NepDisk
af69d91eec Fix Netgames
Whoops forgot to readd doomcom slots when porting stuff
2025-02-28 21:39:28 -05:00
NepDisk
e2f29fd41b Add lagless camera toggle and default to off 2025-02-28 21:20:13 -05:00
NepDisk
18de286a2f Make Item Breaker even more accurate to its Lua version
You can pick up boxes when you have yout item slot full
2025-02-28 19:27:57 -05:00
NepDisk
0e9b47601c Omega needs help!
Give one extra tick of ringboost so omega can atleast maintain duration
2025-02-28 12:38:44 -05:00
NepDisk
dd77d86d6f Fix flame shield not being remove on damage 2025-02-28 03:08:25 -05:00
NepDisk
ef11c55b41 Merge and Update Flameshield overhaul concept 2025-02-28 00:54:24 -05:00
NepDisk
d0327c4079 Auto Shrink Bubbleshield on successful attack/defend and add delay 2025-02-27 13:51:02 -05:00