Mitchell Richters
eaa58e6687
- Exhumed: Get rid of GetWallNormal()
in favour of backend utility.
2023-03-24 19:50:26 +11:00
Mitchell Richters
7fe82690a7
- Exhumed: Fix moving block sound setup to match PowerslaveGDX.
...
* Setup we had looked wrong by comparison, and it eliminates the last goto in the player tick code!
2023-03-24 19:50:26 +11:00
Mitchell Richters
62de240c27
- Exhumed: Reduce branch depth in CheckMovingBlocks()
to make next change more visible.
2023-03-24 19:50:26 +11:00
Mitchell Richters
0e39dbfc95
- Exhumed: Make CheckMovingBlocks()
work on player pointer.
2023-03-24 19:50:26 +11:00
Mitchell Richters
e256ac06e9
- Exhumed: Split out player death pitch code.
2023-03-24 19:50:25 +11:00
Mitchell Richters
8812831c73
- Exhumed: Split out player yaw code.
...
* Consider where this is executed. Should it come after the Ramses check, or be performed along-side player's pitch?
2023-03-24 19:50:25 +11:00
Mitchell Richters
9b3c726458
- Exhumed: Split out player pitch code.
2023-03-24 19:50:25 +11:00
Mitchell Richters
806dca975a
- Exhumed: Remove goto out of updatePlayerAction()
.
...
* Doesn't really make sense and PowerslaveGDX doesn't do any jumping like this here.
2023-03-24 19:50:25 +11:00
Mitchell Richters
4c8b7e6804
- Exhumed: Initial cleanup of updatePlayerAction()
.
2023-03-24 19:50:25 +11:00
Mitchell Richters
791504b5eb
- Remove some pointless weapon functions.
2023-03-24 19:38:10 +11:00
Mitchell Richters
7fe6befef8
- Exhumed: Split out player actions code.
2023-03-24 19:36:43 +11:00
Mitchell Richters
a6cec3d4f1
- Exhumed: Just use pPlayer->nAction
in player code, don't store on the stack.
2023-03-24 15:14:07 +11:00
Mitchell Richters
0842ea3c14
- Exhumed: Clean out some stale goto calls that were commented out.
...
* Only two remaining gotos to handle now.
2023-03-24 15:11:32 +11:00
Mitchell Richters
611d7bae98
- Exhumed: Bring player neartag()
call to branch where it's needed.
2023-03-24 15:11:32 +11:00
Mitchell Richters
ed2c557297
- Exhumed: Remove ClearSpaceBar()
and just directly clear the input bit.
...
* Also fix issue where `SB_OPEN` bit never seemed to be cleared properly.
* Also just directly test/use the player's input actions to minimise stack variables during this cleanup process.
2023-03-24 15:11:32 +11:00
Mitchell Richters
7293a1f5d1
- Exhumed: Pass player pointer through to updatePlayerTarget()
.
2023-03-24 11:59:34 +11:00
Mitchell Richters
cdffb61cc7
- Exhumed: Remove prototype POSIX targets didn't like.
2023-03-23 21:25:49 +11:00
Mitchell Richters
5d6744836f
- Exhumed: Have feebtag()
return an actor pointer instead.
2023-03-23 21:00:35 +11:00
Mitchell Richters
22e135afeb
- Exhumed: Rename pickup actor in pickup code.
2023-03-23 20:52:04 +11:00
Mitchell Richters
757d7b3660
- Exhumed: Split out player pickup code to separate file.
...
* Want to work on this in isolation.
* Can likely optimise this out to a lookup array of function pointers.
2023-03-23 20:50:08 +11:00
Mitchell Richters
f68c168ae4
- Blood: Delete empty file that got missed.
2023-03-23 20:36:37 +11:00
Mitchell Richters
764ec032c1
- Exhumed: Split out player current item code.
2023-03-23 19:48:27 +11:00
Mitchell Richters
f7433234b2
- Exhumed: Split out player quake code.
2023-03-23 19:48:26 +11:00
Mitchell Richters
04ab6f4640
- Exhumed: Split out player invincibility code.
2023-03-23 19:47:41 +11:00
Mitchell Richters
1a8dcda5b6
- Exhumed: Split out player invisibility code.
2023-03-23 19:47:11 +11:00
Mitchell Richters
374f0bb295
- Exhumed: Split out player double code.
2023-03-23 19:46:45 +11:00
Mitchell Richters
b51623b415
- Exhumed: Split out player torch code.
2023-03-23 19:46:18 +11:00
Mitchell Richters
8f21a89abc
- Exhumed: Remove some duplicated code already covered in InitPlayers()
.
2023-03-23 19:14:57 +11:00
Mitchell Richters
27144c0bc3
- Exhumed: Store the player's index within the player's struct.
2023-03-23 19:14:26 +11:00
Mitchell Richters
645d75ba0b
- Exhumed: Use pointers to access player in AIPlayer::Tick()
.
2023-03-23 18:50:30 +11:00
Mitchell Richters
75de294560
- Exhumed: Clean out the rest of input.cpp
.
2023-03-23 17:41:01 +11:00
Mitchell Richters
fb9ff7d105
- Exhumed: Increase quake precision in SetQuake()
.
2023-03-23 17:38:18 +11:00
Mitchell Richters
bd30e31b8d
- Exhumed: Move nQuake[]
array into Player
struct.
2023-03-23 17:38:18 +11:00
Mitchell Richters
05fd2911a4
- Exhumed: Move dVertPan[]
array into Player
struct.
2023-03-23 17:38:18 +11:00
Mitchell Richters
095b33fa67
- Exhumed: Clean out the rest of enginesubs.cpp
.
2023-03-23 17:38:16 +11:00
Mitchell Richters
e85162df97
- Removed unused lastTic
global.
2023-03-23 17:38:01 +11:00
Mitchell Richters
e5f3f5f149
- Make setForcedSyncInput()
require a player index.
...
* This should only ever apply to the console player.
2023-03-23 17:09:02 +11:00
Mitchell Richters
183ad0c61c
- Adjust a few setForcedSyncInput()
calls.
2023-03-23 16:34:33 +11:00
Mitchell Richters
fa5490b834
- Exhumed: Just move analyzesprites()
into gi->processSprites()
.
2023-03-23 15:55:00 +11:00
Mitchell Richters
0ac7af6cd7
- Exhumed: Avoid unnecessarily iterating through tsprites twice.
2023-03-23 15:54:59 +11:00
Mitchell Richters
10ebc00853
- Exhumed: Attempt to make player pTarget updating MP friendly.
...
* This probably works better than using the temporary view pos vector of the console player, anyway.
* Might assist with #626 as well.
2023-03-23 15:54:59 +11:00
Mitchell Richters
3b889d5c36
- Exhumed: Make main loop player index aware.
2023-03-23 15:54:59 +11:00
Mitchell Richters
c486940b2c
- Exhumed: Ensure playsim runs with PlayClock at 0 for first tic.
2023-03-23 15:54:59 +11:00
Mitchell Richters
eed1d14b9d
- Exhumed: Split out velocity updating to static function.
2023-03-23 15:54:59 +11:00
Mitchell Richters
187710e9e2
- Exhumed: Set nFreeze
input locking in right spot.
2023-03-23 15:54:58 +11:00
Mitchell Richters
895304ccee
- Exhumed: Split out weapon updating to static function.
2023-03-23 15:54:58 +11:00
Mitchell Richters
e9e36fedb2
- Exhumed: Split out inventory updating to static function.
2023-03-23 15:54:58 +11:00
Mitchell Richters
4d6419732a
- Duke: Add CVAR to allow disabling pitch reset with pitch input.
...
* Need to add this to the menu to address #853 .
2023-03-23 15:54:58 +11:00
Mitchell Richters
88e6a6e894
- Rework ff652f454c
slightly to accept an InputPacket
pointer.
2023-03-22 20:08:53 +11:00
Mitchell Richters
2b22e49a9b
- Duke: Temporary workaround for last commit so the player returns to centre on level load.
2023-03-22 18:26:23 +11:00
Mitchell Richters
ff652f454c
- Tidy up how games reapply needed bits at start of tic.
2023-03-22 18:17:50 +11:00
Mitchell Richters
e5bad9af2c
- Duke/RR: Re-arrange the playsim angle calls.
...
* Make them precisely where they were originally called from.
2023-03-21 21:37:25 +11:00
Mitchell Richters
181f88b028
- Duke/RR: Remove the confusing VEH_HEELTOE
bit.
2023-03-21 10:41:55 +11:00
Mitchell Richters
2918c34d42
- Duke/RR: Fix two typos.
2023-03-21 10:39:24 +11:00
Mitchell Richters
64a3141f6f
- Duke/RR: Add VEH_TURNING
flag instead of testing left/right in places.
2023-03-21 10:21:30 +11:00
Mitchell Richters
f240b6c623
- Duke/RR: Fix bad flag test that needed to confirm two flags set, not any one of the two.
2023-03-21 10:12:38 +11:00
Mitchell Richters
19ddc1ee51
- Duke/RR: Repair angle test when adjusting velocity.
...
* Initially figured I could just use the sign of the angle adjustment, but the vehicle code makes left/right reversals that necessitate using the flags for this.
2023-03-21 09:39:36 +11:00
Mitchell Richters
a24b8499fc
- Duke/RR: Swap out all 5-6 bools for a bitfield.
2023-03-21 09:39:35 +11:00
Mitchell Richters
a3a150558b
- Duke/RR: Consolidate (mostly) identical vehicle throttle code.
2023-03-20 21:54:47 +11:00
Mitchell Richters
c8238d9646
- Duke/RR: Consolidate (mostly) identical vehicle sound code.
2023-03-20 21:46:18 +11:00
Mitchell Richters
cc977d510a
- Duke/RR: Consolidate identical vehicle drinking code.
2023-03-20 21:46:16 +11:00
Mitchell Richters
07b1ec518b
- Duke/RR: Consolidate identical vehicle bumping code.
2023-03-20 21:07:52 +11:00
Mitchell Richters
d5bc7718d1
- Duke/RR: Tidy up angle changes/accesses in vehicle ticker code.
...
* Already have an actor pointer on the stack we can use.
* Other tidy-ups.
2023-03-20 21:07:52 +11:00
Mitchell Richters
134b635966
- Duke/RR: Ensure braking sync bit is always cleared in onBoat()
.
2023-03-20 21:07:50 +11:00
Mitchell Richters
c6f6cf5933
- Duke/RR: Fix vehicle controller sign that got lost along the way.
...
* Issue from 9d74a5c60b
.
2023-03-19 22:45:02 +11:00
Mitchell Richters
ebd8ab985e
- Duke/RR: Don't archive off MotoSpeed for reuse at end of vehicle functions.
...
* Kept the workflow identical to the old setup in the other commits, but does not seem necessary and all it does is make the speed one tic behind where it would be otherwise.
2023-03-19 21:58:30 +11:00
Mitchell Richters
ba8f1069ab
- Duke/RR: Fix an issue with reversing.
...
* Got the position of the bools wrong here when removing something unsafe from the input handler.
2023-03-19 21:35:39 +11:00
Mitchell Richters
a9e606ca68
- Duke/RR: Shorten a long ternary.
2023-03-19 21:08:43 +11:00
Mitchell Richters
81650036e6
- Duke/RR: Remove vehForward/Reverse variables from player struct.
...
* Back in 2020, I was trying to tidy stuff up and had no idea about network awareness, etc.
* The original game misused network bits here, however I don't see why the player's angle can't just be tested for signedness. Again, something I didn't see way back when...
2023-03-19 20:55:39 +11:00
Mitchell Richters
37e9cfed45
- Duke/RR: Remove vehBraking variable from player struct.
...
* Back in 2020, I was trying to tidy stuff up and had no idea about network awareness, etc.
* We must continue the misuse of network bits like the original game did to make sure the RRRA vehicles are network aware.
2023-03-19 20:54:43 +11:00
Mitchell Richters
31f8de3854
- Duke/RR: Remove vehTurn variables from player struct.
...
* Back in 2020, I was trying to tidy stuff up and had no idea about network awareness, etc.
* The original game misused network bits here, however I don't see why the player's angle can't just be tested for signedness. Something I didn't see way back when...
2023-03-19 20:54:19 +11:00
Mitchell Richters
76e6efd204
- Duke/RR: Fix oversight in previous commit.
...
* Unknowingly had forced synchronised input on!
2023-03-19 20:09:14 +11:00
Mitchell Richters
d380e73cfd
- Duke: Consolidate boat/moto turn functions into one.
2023-03-19 14:59:35 +11:00
Mitchell Richters
c13c244dca
- Simplify moto velocity sign determination.
2023-03-19 14:35:02 +11:00
Mitchell Richters
9d74a5c60b
- Duke: Consolidate vehicle turning code between boat/moto.
2023-03-19 14:35:00 +11:00
Mitchell Richters
56b95a46f7
- Duke: Consolidate vehicle tilting code between boat/moto.
2023-03-19 13:31:47 +11:00
Mitchell Richters
de5b73c60f
- SW: Fix strafing issue due to missing bool negation.
2023-03-19 11:14:04 +11:00
Mitchell Richters
056330863c
- Duke: Eliminate GetActor()
calls in playerisdead()
.
2023-03-19 09:10:14 +11:00
Mitchell Richters
a7d829d539
- Duke: Change where centering view locks the input.
2023-03-19 09:08:24 +11:00
Mitchell Richters
3ad50d5045
- Duke: Don't reset synchronised input flag if centering view.
...
* The way the playsim works, because the horizon functions come after the yaw ones, yaw was not being applied while pitch was locked.
2023-03-18 22:21:38 +11:00
Mitchell Richters
5b382ac2c6
- Duke: Remove everyothertime
global, we can just use PlayClock
.
2023-03-18 22:21:38 +11:00
Christoph Oelckers
792f977d46
- fixed STAT_ACTORS must handle actors where scale.X is 0 as 'deleted' and destroy them.
2023-03-18 12:08:53 +01: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
ee294d7fa0
- Blood: Force synchronised input while dead.
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
b8ba78cf89
- Exhumed: Use array pointers in GameInterface::Ticker()
for one's sanity.
2023-03-18 19:29:28 +11:00
Mitchell Richters
42a895d666
- Exhumed: Move dead checks out of the input handler and into the ticker.
2023-03-18 19:29:15 +11:00
Mitchell Richters
1af60fb02b
- Exhumed: Clear local input accumulation buffer after copying a packet, just like the other games.
2023-03-18 19:19:22 +11:00
Mitchell Richters
0cf44e42fc
- Exhumed: Eliminate initsectp
global.
2023-03-18 19:19:22 +11:00
Mitchell Richters
d30ce9691a
- Exhumed: Eliminate initpos
global.
2023-03-18 19:19:22 +11:00
Mitchell Richters
5fe4b0fdb1
- Exhumed: Eliminate inita
global.
2023-03-18 19:19:21 +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
b1888a44c3
- SW: Process weapon bits within the ticker and not the input handler.
2023-03-18 19:17:30 +11:00
Mitchell Richters
a4f0a75a58
- SW: Simplify unsynchronised input setup.
...
* Had complicated flagging and setup for SO vehicles that never worked and doubt I'd ever get to work.
* Setup now lends itself well to a potential more generic input setup.
2023-03-18 19:17:30 +11:00