Commit graph

3027 commits

Author SHA1 Message Date
Simon
7536fbfa85 Merge remote-tracking branch 'upstream/master' 2023-03-18 10:22:22 +00:00
Mitchell Richters
1147030bca - Remove concept of InputOptions, its messy and unnecessary. 2023-03-18 21:16:50 +11:00
Mitchell Richters
b3c27a177e - Consolidate each game's gi-GetInput() into a unified function.
* Eliminates a lot of boilerplate.
* Consolidation of input accumulation buffers discretely used in each game.
* Allows privatisation of `PlayerAngles::CameraAngles`.
2023-03-18 19:49:25 +11:00
Mitchell Richters
65ee4b14d6 - Move gi->getConsoleActor() directly into the header. 2023-03-18 19:29:29 +11:00
Mitchell Richters
4355a44721 - Duke: Rework input blocking setup.
* Takes the duplicated conditions out of the input handler and makes the ticker responsible by forcing synchronised input.
2023-03-18 19:29:29 +11:00
Mitchell Richters
bd3e9b305e - Adjust signatures of input functions slightly for consistency. 2023-03-18 19:29:29 +11:00
Mitchell Richters
401236980c - Duke: Tidy up some unnecessarily deep branches in vehicle input code. 2023-03-18 19:19:21 +11:00
Mitchell Richters
51a20211f3 - Duke: Tidy up some repeated bools in vehicle input code. 2023-03-18 19:19:21 +11:00
Mitchell Richters
37dda1aa0e - Duke: Move input bit pre-processing into hud_input().
* Really, _really_ need to do something about this `crouch_toggle` malarkey...
2023-03-18 19:19:20 +11:00
Mitchell Richters
5a6495956f - Duke: Move Quick_Kick button test into ApplyGlobalInput() as it doesn't seem to share a bit with any other game anymore. 2023-03-18 19:17:30 +11:00
Mitchell Richters
292030b59e - Duke: Repair issues with going underwater after taking some stuff out of the global state.
* Really, need to do something about this `crouch_toggle` malarkey...
2023-03-18 19:17:28 +11:00
Mitchell Richters
b07732bae4 - Duke: Remove duplicated call to SetupGameButtons() that's done globally in RunGame(). 2023-03-18 09:15:17 +11:00
Mitchell Richters
a45890e064 - Move some Duke-specific stuff out of ApplyGlobalInput(). 2023-03-18 09:15:15 +11:00
Mitchell Richters
eed9716d86 - Move joyaxes[] array from getHidInput() directly into ControlInfo. 2023-03-17 20:58:38 +11:00
Mitchell Richters
fc069feac6 - Negate ControlInfo::dyaw to match data out of backend. 2023-03-17 20:58:13 +11:00
Mitchell Richters
446218dd7b - Get mouse/controller input by pointed variable and not copy on return. 2023-03-17 20:58:11 +11:00
Mitchell Richters
1f97e73501 - Rename ControlInfo joystick variables to names matching backend. 2023-03-17 20:16:58 +11:00
Mitchell Richters
686bec5664 - Duke: Make vehicle input functions work on floats and not doubles and FAngles.
* It's what's natively needed at the end of the day.
2023-03-17 19:40:46 +11:00
Mitchell Richters
81caf74721 - Tidy up coord stat to use gi->getConsoleActor() and also print pitch. 2023-03-17 17:28:26 +11:00
Mitchell Richters
3c4b4e4483 - Tidy up warptocoords CCMD since everything is in an actor now.
* Now accepts floating point inputs.
* Restores lost pitch capability.
2023-03-17 17:28:04 +11:00
Mitchell Richters
e6cffbaefb - Duke: Remove unnecessary playrunning() test within a loop. 2023-03-17 14:41:17 +11:00
Mitchell Richters
130c5315e9 - Call PlayerAngles::resetCameraAngles() from within the player loop of each game.
* I was only thinking of the console player initially but since each game can draw the view of other players in network games, each game will need to update and reset the camera angles for all players.
2023-03-17 14:40:18 +11:00
Mitchell Richters
d329328191 - Rename PlayerAngles::RenderAngles to CameraAngles.
* Better conveys what it is and separates it from the already established `getRender*()` methods around the place.
* Sorry Simon!
2023-03-17 14:20:36 +11:00
Mitchell Richters
d6b68dec5e - Duke: Remove player_struct::resurrected flag I added in 2021 and fix issue properly.
* The check for `player_struct::dead_flag` in `FinalizeInput()` was overzealous and is not checked in the original code in this instance.
2023-03-17 12:29:37 +11:00
Mitchell Richters
c4041affb1 - Duke: Reduce boilerplate from previous commit. 2023-03-16 22:24:34 +11:00
Mitchell Richters
9a17d33579 - Duke: Ensure spawned player actor has view height baked in up until the first getzrange() call.
* The original game spawning the player's sprite/actor would set the sprite's pos with the Z matching the player's, which had a height offset already applied.
* This baked in height offset was carried through up until the `SetActor()` call in `processinput()`, where the original game would then strip off `gs.playerheight`.
* This baked in height offset within the actor is critical on the first tic for pre-activated elevators on level spawn to function right, such as E1L2 and E2L3.
* Properly setting the player actor's Z immediately after the initial `getzrange()` call, but before other functions like `movement()`, etc further down in `processinput()` is the best spot.
* Fixes #870.
2023-03-16 22:15:11 +11:00
Mitchell Richters
a90665732c - Clean up other PlayerAngles interfaces for consistency. 2023-03-14 21:45:38 +11:00
Mitchell Richters
62561d863e - Tidy up PlayerAngles::doPitchKeys() interface by passing the whole sync packet through. 2023-03-14 21:45:37 +11:00
Mitchell Richters
18ef460a99 - Tidy up interface for PlayerAngles::doViewPitch() since we have internal access to the player's actor. 2023-03-14 21:45:36 +11:00
Simon
379157708c Proper support for left-hand controls
also made the RR pistol a little less terrible, as it is a bit frustrating in VR
2023-02-19 09:57:48 +00:00
Simon
74c7a65842 Several Fixes
- Fix issue with crosshair  not showing in readneck rampage
- Fix issue with off-hand direction stopping movement
- Fix RR worldscale
2023-02-18 17:08:36 +00:00
Simon
8ad59c7e43 Fixed couple of 6DoF issues...
- Duke: Fixed issue where for some sectors the weapon wouldn't appear to fire any projectiles
- Blood: Fixed 6DoF Pitch being based on headset angle
- Blood: Fixed 6DoF Z position being based on headset
- All games use 6DoF Z position as an offset from view position
2023-02-17 22:55:39 +00:00
Simon
c9dc3c628f Merge remote-tracking branch 'upstream/master' 2023-02-16 22:10:57 +00:00
Simon
7c37bad4ac Squashed commit of the following:
commit 57ebeb79e2
Author: Simon <simonbrown77@googlemail.com>
Date:   Thu Feb 16 22:07:38 2023 +0000

    Fixed issue with FrameSetup being called in the wrong place

    this seemed to limit the correctly submitted frames to 60 fps!

commit 16299b3f8a
Author: Simon <simonbrown77@googlemail.com>
Date:   Tue Feb 14 20:51:03 2023 +0000

    Get floor height offset correct for each game

commit fa74cf0559
Author: Simon <simonbrown77@googlemail.com>
Date:   Tue Feb 14 20:37:29 2023 +0000

    Clean exit on Pico & Quest

    and gold tier patron credit screen

commit deb2c35988
Author: Simon <simonbrown77@googlemail.com>
Date:   Mon Feb 13 22:22:29 2023 +0000

    Number of small changed

    - Hide crosshair if it isn't needed
    - Don't draw black bar when drawing FPS counter
    - added roll in to the weapon sprite
    - If drawing full screen mode always use orthographic projection

commit f1a165add7
Author: Simon <simonbrown77@googlemail.com>
Date:   Mon Feb 13 21:44:42 2023 +0000

    FInal changes to get MV rendering correctly

commit 936f079db8
Merge: 06a99dbaf f8c1f49e6
Author: Simon <simonbrown77@googlemail.com>
Date:   Mon Feb 13 11:29:23 2023 +0000

    Merge branch 'multiview' into direct-eye-buffers

commit 06a99dbafb
Author: Simon <simonbrown77@googlemail.com>
Date:   Mon Feb 13 11:26:44 2023 +0000

    Implementation using no additional frame buffers

commit f8c1f49e6f
Author: Simon <simonbrown77@googlemail.com>
Date:   Sun Feb 12 11:19:27 2023 +0000

    Failed attempt at multiview
2023-02-16 22:09:25 +00:00
Simon
578f7cfbcd Fix issue where crosshair would disappear or get stuck
Was the fact that the controller was actually in a different sector to the player actor.
2023-02-10 22:42:19 +00:00
Simon
9eb86eaa40 Added 6DoF weapons to all the other game modes 2023-02-09 23:04:41 +00:00
Christoph Oelckers
6c77d1c39e - Duke: fixed setup of purely scripted enemies,
Some band-aid is still needed for the time being.
2023-02-09 17:34:59 +01:00
Simon
82b83af956 True 6DoF weapons and aiming crosshair (Duke Only) 2023-02-08 22:48:47 +00:00
Simon
00d07de8a7 Update menu in pk3
remove warning about positional tracking issues (thanks to Mitch fixing it in Raze upstream)
Ensure SW pitch is set correctly
2023-02-06 21:43:31 +00:00
Simon
4012183cf1 Merge remote-tracking branch 'upstream/master' 2023-02-04 14:33:56 +00:00
Mitchell Richters
991ef5c27f - Minor input tidy-up. 2023-02-04 17:05:18 +11:00
Simon
159c316ebb Merge remote-tracking branch 'upstream/master' 2023-01-29 19:18:17 +00:00
Christoph Oelckers
4328016963 - move the remaining parts of spawninitdefault to DukeActor::Initialize.
This ensures proper execution of all code - spawninitdefault was designed to be the fallback for actors without a special case in spawninit.
2023-01-28 16:33:35 +01:00
Christoph Oelckers
38b278b12d - fixed enemy setup.
All enemies now run a native init function to reduce script-induced problems.

this required adding a NOGRAVITY flag so that the recon can use the same code as well which was the only enemy relying on custom code.
2023-01-28 16:33:15 +01:00
Christoph Oelckers
0db441accb - scriptified the native parts of the powder keg.
This was the last remaining actor with its own native ticking part.
2023-01-28 16:31:46 +01:00
Christoph Oelckers
9f01c87ccb - scriptified the native part of FireflyFlyingEffect. 2023-01-28 16:31:45 +01:00
Christoph Oelckers
9783b8c402 - scriptified World Tour's flamethrowerflame.
The first of 3 mixed native/CON items which are the last things remaining in the main thinker loops.
2023-01-28 16:31:45 +01:00
Simon
42f29bd4bb Merge remote-tracking branch 'upstream/master' 2023-01-27 09:33:18 +00:00
Christoph Oelckers
81f6899e72 - C++20 constant fixes.
Use of enums is deprecated in floating point calculations.
2023-01-21 10:34:44 +01:00
Simon
e248c158a8 Merge remote-tracking branch 'upstream/master' 2023-01-16 21:16:26 +00:00