Mitchell Richters
0387282e37
- Fix two particularly loud warnings from GCC builds.
...
* `warning: type qualifiers ignored on function return type`.
2023-03-26 15:35:33 +11:00
Mitchell Richters
7d5ca901eb
- Exhumed: Clear all input out upon restarting the player.
...
* Stale accumulation from the last round can apply on the next tic.
2023-03-26 15:17:28 +11:00
Mitchell Richters
776c58c58a
- Duke: If we enter playerCenterView()
and put SB_CENTERVIEW()
back on, we need to null and lock input.
2023-03-26 14:36:23 +11:00
Mitchell Richters
0da2afe3d7
- Duke: Tidy up some of the pitch stuff.
...
* Remove some extern'd CVARs that didn't need externing.
* Change `player_struct::centeringView()` bool into proper method to handle the operation.
* Operation now properly unsets `SB_CENTERVIEW` if conditions aren't met instead of relying on implied behaviour from the rest of the playsim.
2023-03-26 13:35:12 +11:00
Mitchell Richters
a5a9882d9a
- Duke: Add a myriad of pitch recentering CVARs.
...
* Needs to be reworked into some kind of MP-safe flagging once we have demos/MP going. This will do for now.
* Fixes #853 .
2023-03-26 12:46:14 +11:00
Mitchell Richters
11049123b0
- Exhumed: Bring pickup code back into player.cpp
...
* We're going to tabbify everything soon anyway, might as well bring it in now.
2023-03-26 10:30:27 +11:00
Mitchell Richters
8f8809f66c
- Exhumed: Minor formatting changes to a number of player functions.
2023-03-26 10:00:06 +11:00
Mitchell Richters
76777a6567
- Exhumed: Change doPlayerActionSequence()
to do an early return instead of nested branches.
2023-03-26 10:00:06 +11:00
Mitchell Richters
dcfab3e57c
- Exhumed: Change doPlayerDeathRestart()
to do an early return instead of nested branches.
2023-03-26 10:00:06 +11:00
Mitchell Richters
b6c3753d3a
- Exhumed: Change doPlayerMovingBlocks()
to do an early return instead of nested branches.
2023-03-26 10:00:04 +11:00
Mitchell Richters
838aebdfb7
- Exhumed: Change doPlayerFloorDamage()
to do an early return instead of nested branches.
2023-03-26 09:51:26 +11:00
Mitchell Richters
8d1531ba78
- Exhumed: Change updatePlayerTarget()
to do an early return instead of nested branches.
2023-03-26 09:50:57 +11:00
Mitchell Richters
e7a0354109
- Exhumed: Fix possible workflow issue with zvel in doPlayerMovement()
.
...
* Originates from d976a6da01
.
* During change I missed the clamping of the zvel value between capturing `zz` and `zVel`.
* No observed issues, only noticed it when comparing something else but lets 100% maintain a accurate workflow.
2023-03-25 23:27:15 +11:00
Christoph Oelckers
8503f34eb5
- fix error message crash in SNDINFO parser.
2023-03-25 12:24:11 +01:00
Mitchell Richters
2bc6df7678
- Exhumed: Repair signedness issue with weapon change code.
...
* Never revealed itself when I was cheating to get weapons.
* Fixes #898
2023-03-25 22:05:06 +11:00
Christoph Oelckers
c6054595d0
- fixed lookup table generation for foggy fades.
...
ColorMatcher.Pick is not correct here, fortunately we do not need this for fog setup as it never uses the lookup so just do a normal copy of the first (fullbright) table.
2023-03-25 11:42:50 +01:00
Mitchell Richters
8f748fdb2a
- Exhumed: Fix noclipping so the player can clip through anything.
...
* The `inside()` test is now only performed when noclipping is off.
2023-03-25 21:36:17 +11:00
Mitchell Richters
7410c78ce4
- Exhumed: Merge pitch/yaw functions into one to minimise spread.
2023-03-25 21:26:56 +11:00
Mitchell Richters
7d6425fa06
- Exhumed: Amend 79f7ca976b
to use algorithm to cancel view pitch when disabling cl_slopetilting
.
2023-03-25 21:26:55 +11:00
Mitchell Richters
0189936070
- Exhumed: Use player pointer in MoveWeapons()
.
2023-03-25 21:26:55 +11:00
Mitchell Richters
4e1b269c59
- Exhumed: Use player pointer in AIPlayer::Draw()
.
2023-03-25 21:26:55 +11:00
Mitchell Richters
d270099aa7
- Exhumed: Use player pointer in AIPlayer::Damage()
.
2023-03-25 21:26:55 +11:00
Mitchell Richters
f0b9937ec7
- Exhumed: General tidy-up of AIPlayer::Damage()
.
2023-03-25 21:26:55 +11:00
Mitchell Richters
c3f0edf802
- Exhumed: Use player pointer in AIPlayer::Damage()
.
2023-03-25 21:26:54 +11:00
Mitchell Richters
45be386f7f
- Exhumed: Move nTemperature[]
into Player
struct.
2023-03-25 21:26:54 +11:00
Mitchell Richters
572869f502
- Exhumed: Reorganise RestartPlayer()
so player/actor variables are grouped.
2023-03-25 21:26:54 +11:00
Mitchell Richters
b4028cb250
- Exhumed: Clean up stack pointer names in RestartPlayer()
.
2023-03-25 21:26:54 +11:00
Mitchell Richters
c79a979395
- Exhumed: Store a player pointer on the stack and use in updatePlayerVelocity()
.
2023-03-25 21:26:52 +11:00
Mitchell Richters
7cfb5d9286
- Exhumed: Removed unneeded resetting of nDestVertPan
in doPlayerFloorDamage()
.
...
* Original game code below it was just resetting it anyway.
2023-03-25 19:56:20 +11:00
Mitchell Richters
12b4f68f24
- Exhumed: Directly inline interpfrac test into gi->Render()
.
2023-03-25 19:56:19 +11:00
Christoph Oelckers
32237421c9
- Exhumed: fixed Ramses's programmatic texture
2023-03-25 09:52:31 +01:00
Mitchell Richters
f96bc3ee31
- Exhumed: Reposition bIsFiring
setting.
...
* Mistake from e5e1428062
.
2023-03-25 18:13:11 +11:00
Mitchell Richters
e34c4353f6
- Exhumed: Properly clamp off pitch in death function.
2023-03-25 17:27:33 +11:00
Mitchell Richters
025f2ec5fb
- Exhumed: Do player pitch/yaw before movement code.
2023-03-25 16:58:15 +11:00
Mitchell Richters
79f7ca976b
- Exhumed: Refactor the pitch tilting/panning code.
...
* Made it work on the player's view pitch and not their actual pitch.
* Drastically simplifies implementation and allows its use even with mouse aiming.
2023-03-25 16:52:13 +11:00
Mitchell Richters
7ecf6b26c3
- Exhumed: Might as well split out the death restart as well.
2023-03-25 16:06:19 +11:00
Mitchell Richters
7da9b2c17d
- Exhumed: Slightly re-arrange where movement actions are called.
...
* Removes jank setups like testing whether the player is dead and nulling their input. Now, the movement code just doesn't call if they're dead.
2023-03-25 15:57:23 +11:00
Mitchell Richters
e5e1428062
- Exhumed: Split off runlist signal code from player ticker.
2023-03-25 15:57:22 +11:00
Mitchell Richters
a86751a355
- Exhumed: Move all underwater code into doPlayerBreath()
.
...
* Renamed to `doPlayerUnderwater()`.
* Keeps all underwater logic together.
* More importantly, fixes an issue 🙃 .
2023-03-25 15:12:13 +11:00
Mitchell Richters
52618ede14
- Exhumed: Amend 187710e9e2
.
2023-03-25 15:10:54 +11:00
Mitchell Richters
1ed91ade54
- Exhumed: Fix dopple actor picnum updating.
2023-03-25 14:19:07 +11:00
Mitchell Richters
481c52f175
- Exhumed: Move some player code out of exhumed.cpp and into player.cpp where it should be.
2023-03-25 14:08:02 +11:00
Mitchell Richters
ae361208a0
- Exhumed: Tidy up flags in feebtag()
.
2023-03-25 13:18:46 +11:00
Mitchell Richters
66c4a753d9
- Exhumed: Move doPickupHealth()
lambda out of doPlayerPickupItems()
.
2023-03-25 12:51:18 +11:00
Mitchell Richters
d5a0dd3d80
- Exhumed: Move doPickupWeapon()
lambda out of doPlayerPickupItems()
.
2023-03-25 12:46:37 +11:00
Mitchell Richters
3854a97913
- Exhumed: Move doProcessPickup()
lambda out of doPlayerPickupItems()
.
2023-03-25 12:43:06 +11:00
Mitchell Richters
27534c433d
- Exhumed: Move lambdas out of doPlayerPickupItems()
, starting with doConsoleMessage()
.
2023-03-25 12:40:00 +11:00
Mitchell Richters
33cea4a7e1
- Exhumed: Remove offset in doPlayerItemPickups()
and just use the statnum.
2023-03-25 12:28:33 +11:00
Mitchell Richters
06e97d26aa
- Exhumed: Merge grenade pickup code into generic lambda.
2023-03-25 10:52:40 +11:00
Mitchell Richters
249d6b1b81
- Exhumed: Use an actor pointer on the stack in doPlayerCounters()
.
2023-03-25 10:08:55 +11:00
Mitchell Richters
128997c79c
- Exhumed: Clean up double getting of player actor in doPlayerBreath()
.
2023-03-25 10:06:18 +11:00
Mitchell Richters
47d25932d5
- Exhumed: Move doPlayerMask()
into doPlayerCounters()
.
2023-03-25 09:42:37 +11:00
Mitchell Richters
1ebc634ac0
- Exhumed: Consolidate two more cases in pickup code.
2023-03-25 08:44:27 +11:00
Mitchell Richters
c0d13f7619
- Exhumed: Use lookup table for health pickups in doPlayerItemPickups()
.
2023-03-25 08:43:50 +11:00
Mitchell Richters
e766c29fd5
- Exhumed: Use lookup table for weapon pickups in doPlayerItemPickups()
.
2023-03-25 08:41:45 +11:00
Mitchell Richters
be9ece4afc
- Exhumed: Use lookup table for some weapon types in doPlayerItemPickups()
.
2023-03-25 07:42:20 +11:00
Mitchell Richters
1013d41f89
- Exhumed: Use lookup table for item type in doPlayerItemPickups()
.
2023-03-25 07:32:29 +11:00
Mitchell Richters
07dda89cfd
- Exhumed: Merge all player counter code into one function.
...
* Probably a bit too much to break these down as much as I did.
2023-03-25 00:12:52 +11:00
Mitchell Richters
72af290502
- Exhumed: Pass tint values through to lambdas as args as well.
2023-03-25 00:09:17 +11:00
Mitchell Richters
da47369582
- Exhumed: Pass item, amount and sound through to lambdas as args.
2023-03-25 00:09:17 +11:00
Mitchell Richters
84223b6b04
- Exhumed: Remove call to doConsoleMessage()
from default lambda so what's going on is clearer.
2023-03-25 00:09:17 +11:00
Mitchell Richters
24b21345b1
- Exhumed: And same for health pickup process.
2023-03-25 00:09:16 +11:00
Mitchell Richters
16c2fa3abe
- Exhumed: Same for weapon pickup process.
2023-03-25 00:08:54 +11:00
Mitchell Richters
239ee20a6d
- Exhumed: Same for main pickup process.
2023-03-25 00:08:54 +11:00
Mitchell Richters
77e262ce3c
- Exhumed: Swap out flag setup in doPlayerItemPickups()
for lambdas, starting with console messages.
2023-03-25 00:08:54 +11:00
Mitchell Richters
40033c3a9d
- Exhumed: Final switch case statement cleanups in doPlayerItemPickups()
.
2023-03-25 00:08:53 +11:00
Mitchell Richters
83c7dfa7c9
- Exhumed: Clean up weapon pickups in doPlayerItemPickups()
.
2023-03-24 23:19:57 +11:00
Mitchell Richters
935450251a
- Exhumed: Clean up some more switch case statements in doPlayerItemPickups()
.
2023-03-24 23:19:14 +11:00
Mitchell Richters
b99e2fa600
- Exhumed: Clean up health pickups in doPlayerItemPickups()
.
2023-03-24 23:18:30 +11:00
Mitchell Richters
7f4b9d29b0
- Exhumed: Clean up first few switch case statements in doPlayerItemPickups()
.
2023-03-24 23:17:59 +11:00
Mitchell Richters
48803b3631
- Exhumed: Remove gotos in doPlayerItemPickups()
and use flag system like PowerslaveGDX.
2023-03-24 23:17:45 +11:00
Mitchell Richters
3f6a0661b6
- Exhumed: Default init nSound
to -1 as the code tests > -1 for validity.
2023-03-24 21:42:54 +11:00
Mitchell Richters
a7c311e291
- Exhumed: Tidy up stack variables in doPlayerItemPickups()
.
2023-03-24 21:42:40 +11:00
Mitchell Richters
154084322e
- Exhumed: Final cleanup of AIPlayer::Tick()
.
2023-03-24 21:13:42 +11:00
Mitchell Richters
650aa65533
- Exhumed: Split out player dopple actor update code.
...
* This cleans most of the player tick code. Now, onto that ghastly pickup code...
2023-03-24 21:13:42 +11:00
Mitchell Richters
0230a51ce2
- Exhumed: Split out player action sequence code.
2023-03-24 21:13:42 +11:00
Mitchell Richters
77fa3f6ea9
- Exhumed: Split out player view sector code.
2023-03-24 21:13:40 +11:00
Mitchell Richters
9c471e0209
- Exhumed: Split out floor damage code.
2023-03-24 20:31:43 +11:00
Mitchell Richters
e1f4b8d8e3
- Exhumed: Split out moving blocks code again.
2023-03-24 20:31:43 +11:00
Mitchell Richters
830c0b72cf
- Exhumed: Split out player movement code.
2023-03-24 20:31:43 +11:00
Mitchell Richters
911c5158d2
- Exhumed: Split out player floor actor code.
2023-03-24 20:31:43 +11:00
Mitchell Richters
5fc0b25ad5
- Exhumed: Split out player breath/air/oxygen code.
2023-03-24 20:31:42 +11:00
Mitchell Richters
16561c2a6a
- Exhumed: Split out player mask code.
2023-03-24 20:31:08 +11:00
Mitchell Richters
62c045a14f
- Exhumed: Clean up some underwater checks.
2023-03-24 20:31:07 +11:00
Mitchell Richters
b160d78701
- Exhumed: Tidy up vect variables on the stack.
2023-03-24 20:26:18 +11:00
Mitchell Richters
4cdced60b1
- Exhumed: Tidy up some pos/sect variables on the stack.
2023-03-24 19:52:38 +11:00
Mitchell Richters
d976a6da01
- Exhumed: Tidy up zVal
on player ticker stack.
2023-03-24 19:52:37 +11:00
Mitchell Richters
5463b14b26
- Exhumed: Split out player ramses code.
2023-03-24 19:52:36 +11:00
Mitchell Richters
0271a49030
- Exhumed: Move moving block check code back into player ticker for now.
...
* Reverts 52b2d1cd7d
* Upon closer inspection, the original code here used `zz` on the player stack, which was re-obtained again using the actor's Z vel, however the actor's Z vel gets modified along the way which could break how this code is meant to work.
* Should be split again but requires holistic thought.
2023-03-24 19:50:27 +11:00
Mitchell Richters
e2d3c4dceb
- Exhumed: Get rid of GetAngleToSprite()
in favour of backend utility.
2023-03-24 19:50:27 +11:00
Mitchell Richters
eaa58e6687
- Exhumed: Get rid of GetWallNormal()
in favour of backend utility.
2023-03-24 19:50:26 +11:00
Mitchell Richters
9906586569
- Make walltype::normalAngle()
normalise the returned value.
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
f80b98fe92
- Fix CMakeLists.txt.
...
* Didn't know these were in there... 🤦♂️ .
2023-03-23 21:16:04 +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
7da3b097fb
- Remove the extern status for gamesetinput
.
...
* We don't need to save this variable, we reset it at the start of every tic anyway.
2023-03-23 17:03:43 +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
CandiceJoy
9c65d2cde1
Fixed Mac default wad/grp search paths.
2023-03-19 20:41:46 +01: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
4153c38bd3
- Clean up GameInterface
struct a bit.
...
* Make everything that's overridden abstract.
* Remove defunct/deleted methods.
2023-03-19 11:27:07 +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
Christoph Oelckers
9b751d6469
use GAMENAMELOWERCASE for defining GAME_DIR.
...
This was handled inconsistently in different parts of the Mac backend.
2023-03-18 12:31:32 +01: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
366423a09b
- Extra const-ness that I'm not sure matters or not.
2023-03-18 20:14:01 +11:00
Mitchell Richters
672c53c35c
- Move CCMD pause
to gamecontrol.cpp so it can be static.
2023-03-18 19:54:05 +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
3442290fa2
- Repair bad setup for global input scale uncovered after making Duke better.
...
* `I_GetInputFrac()` must always be called, even if we don't use it otherwise the value grows too large.
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
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
08d22f49f4
- Negate ControlInfo::dpitch
to match data out of backend.
2023-03-17 20:58:13 +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
7f79ee9801
- Exhumed: Repair missing negation affecting death sequence.
...
* Pitch negation strike's back!
2023-03-17 19:17:18 +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
742a2e5c9a
- Exhumed: Ensure automap uses untouched interpolated actor position.
...
* Using chase cam while the automap was on was drawing the player sprite incorrectly.
2023-03-17 14:11:27 +11:00
Mitchell Richters
0fca5b14a2
- SW: Ensure automap uses untouched interpolated actor position.
...
* Using chase cam while the automap was on was drawing the player sprite incorrectly.
2023-03-17 13:45:29 +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
Christoph Oelckers
d17650f885
- removed the ValidateTarget call from HackSeqCallback.
...
The original function does not validate its target, it just uses undefined memory instead when this case happens.
2023-03-16 17:49:50 +01: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
8bcbc1b892
- Null the roll angle used for weapon drawing when looking left/right and with Blood's delirium for now.
...
* Intended to make the look left/right keys better, but doesn't work properly for weapons made up of layered parts of varying sizes.
* Fixes #879 .
2023-03-16 16:34:31 +11:00
Mitchell Richters
528eb0ea9a
- Blood: Fix state checks when using TNT while diving underwater.
...
* A mess of bloody proportions...
* Originates from d30c94c709
.
* Fixes #878 .
2023-03-16 15:50:52 +11:00
Mitchell Richters
cb1e4e7a34
- Exhumed: Ensure Player::items[]
is signed.
...
* Change originates from b71c725e3e
.
* Matches PCExhumed and GDX.
* Logic in game requires this variable to be signed.
* Fixes #415 .
* Fixes #888 .
2023-03-16 13:05:22 +11:00
Mitchell Richters
3d6f1e1a04
- Exhumed: Store dedicated player velocity in Player struct.
...
* Changes implementation in 67c7dd65f9
.
* Cannot rely on the actor's velocity alone as parts of the game modify this, such as getting hit by lava dudes, but game nullifies this at the start of the player's tic.
2023-03-16 12:17:42 +11:00
Mitchell Richters
b42b9de2a2
Revert "- SW: Tune shadow drawing code so that it by default uses the sector's interpolated floorz when possible."
...
This reverts commit 3271c2011e
.
* Fixes #884
* Fixes #892
2023-03-16 11:23:05 +11:00
Mitchell Richters
0d62e6befe
- Exhumed: Optimise UnlinkIgnitedAnim()
from fb97e3c6ca
a bit.
...
* Bad cherry pick caused a stat iteration over the wrong stat number.
* Cleaned up commentary to reflect that we have actors and not so much sprites or an anim array anymore.
2023-03-15 22:52:14 +11:00
Mitchell Richters
07a82508fa
- Blood: Fix palette of actor sprite on 2D automap.
...
* Fixes #846 .
2023-03-15 22:22:52 +11:00
Mitchell Richters
e8f2f98473
- Repair voxel 2D vector adjustment.
...
* Originates from a6fb831894
.
* Division taken off, probably mixing up x/yrepeat and x/yoffset.
* Fixes #869 .
2023-03-15 20:42:24 +11:00
Mitchell Richters
a4bca328bc
- SW: Remove Player::siang
since we have the same data in
2023-03-15 19:57:45 +11:00
Mitchell Richters
7da3c62ea8
- Blood: Repair velocity scaling in ConcussSprite()
.
...
* Issue originates back from 645c606e39
.
* During initial floatification, the velocity addition was changed a mulscale of 16 to 12, quadrupling the amplification.
* A lot's changed since then, but we can restore the size of the velocity by simply dividing the size value by 4x.
* Turned into a reciprocal as well to avoid division.
* Fixes #860 .
2023-03-15 19:42:33 +11:00
Mitchell Richters
39624da390
- SW: Remove getViewHeightDiff()
call in player sprite draw code.
...
* I added this when removing the player's pos vector in lieu of the sprite vector to further smooth out the sprite's Z in chase cam mode, but it just doesn't look good.
2023-03-15 19:42:33 +11:00
sirlemonhead
fb97e3c6ca
PCExhumed: Fixed Ignited sprite anim issue that could cause invalid array access.
...
* Fixes #638 .
2023-03-15 17:20:29 +11:00
Mitchell Richters
0dba1af7c0
- Move canslopetilt
test for PlayerAngles::doViewPitch()
.
2023-03-15 16:36:56 +11:00
Mitchell Richters
2162e51424
- Blood: Amend how QAVs process when game is paused.
...
* Repair of initial implementation in ebdc9c31f2
.
* Fixes #883 .
2023-03-14 21:45:47 +11:00
Mitchell Richters
016016b7ab
- Blood: Fix max weapons slot test preventing slot 12
from being called.
...
* Fixes #891 .
2023-03-14 21:45:46 +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
9ffc65fa48
- Exhumed: Eliminate PlayerInput
struct in favour of InputPacket
object PlayerList::input
.
2023-03-14 21:45:37 +11:00
Mitchell Richters
67c7dd65f9
- Exhumed: Remove PlayerInput::vel
in favour of just using actor's velocity.
2023-03-14 21:45:37 +11:00
Mitchell Richters
73acffac2c
- Exhumed: Move PlayerInput::nItem
to Player
struct as Player::nCurrentItem
.
2023-03-14 21:45:37 +11:00
Mitchell Richters
f77b1007be
- Exhumed: Remove unused PlayerInput::buttons
2023-03-14 21:45:37 +11:00
Mitchell Richters
c73ee5f848
- Exhumed: Move PlayerInput::pTarget
to Player
struct.
2023-03-14 21:45:37 +11:00
Mitchell Richters
c1f52b1137
- Adjust PlayerAngles::doViewPitch()
so that view pitch always resets to 0 upon enabling mouse aiming.
2023-03-14 21:45:36 +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
alexey.lysiuk
41d7118099
- fixed compilation error
...
source\core\razefont.cpp(60,3): error C2181: illegal else without matching if
2023-02-21 10:30:44 +02:00
Christoph Oelckers
07d87940f2
- completed all of Blood's and Duke's fonts.
2023-02-20 16:52:51 +01:00
Christoph Oelckers
b645929035
- fixed some message mappings.
2023-02-19 13:01:20 +01:00
Christoph Oelckers
6729c342af
- undid bad code from a broken GZDoom PR.
2023-02-11 19:49:49 +01:00
Christoph Oelckers
09c8430e4e
- removed bad include.
2023-02-11 12:36:31 +01:00
Christoph Oelckers
8c99d7b034
- Backend update from GZDoom
...
* scriptable CVARs.
* GLES update
* various ZScript improvements.
2023-02-11 12:06:58 +01:00