Mitchell Richters
b340807a6b
- Remove now-unneeded inline wrapper getHidInput()
.
2023-04-02 18:24:05 +10:00
Mitchell Richters
46b5977a6a
- Recover two ESyncBit
values for other uses.
...
* By masking aiming+centering, we have look bits :)
2023-04-02 18:24:05 +10:00
Christoph Oelckers
e1ea0492e1
- savegame version bump.
2023-04-02 08:50:05 +02:00
Christoph Oelckers
1e7850b17e
- fixed last commit
2023-04-01 12:27:48 +02:00
Christoph Oelckers
a64f19c16d
- had to apply the RapidJson NaN workaround to another place.
...
So instead of fixing the bug they actually replicated it into a second function. :(
It's too bad that we cannot enable proper writing of NaNs and Infs because it makes most JSON formatters emit an error on this undefined extension of the format.
2023-04-01 10:26:51 +02:00
Christoph Oelckers
5f3065d9f1
- Duke: fixed weapon spread with non-pistol hitscan weapons.
2023-04-01 09:49:22 +02:00
Mitchell Richters
86711f666b
- Exhumed: Tidy up StartDeathSeq()
.
2023-03-29 19:41:05 +11:00
Mitchell Richters
3e4dd94fe5
- Exhumed: Tidy up a bunch of small player functions.
2023-03-29 19:40:42 +11:00
Mitchell Richters
0467b02393
- Exhumed: Mark all player static arrays as const.
2023-03-29 19:39:54 +11:00
Mitchell Richters
daf63ce209
Revert "- InputState::ClearAllInput()
: Only clear crouch_toggle
bool if outside of a level, and resend SB_CROUCH
sync bit if inside a level and crouch_toggle
is true."
...
This reverts commit c076310e34
.
* It's no longer needed with 70706d3da8
.
2023-03-29 13:21:14 +11:00
Mitchell Richters
70706d3da8
- Don't stop getting input when we're paused.
...
* This is the cause of the long-standing crouch toggle issues, as well as a few other things.
2023-03-29 13:20:55 +11:00
Mitchell Richters
7feb5a9a9b
Revert "- Duke: Temporary workaround for last commit so the player returns to centre on level load."
...
This reverts commit 2b22e49a9b
.
* It's no longer needed with 06dd971291
.
2023-03-29 13:20:55 +11:00
Mitchell Richters
06dd971291
- When the gameaction
is ga_level
, return and don't break.
...
* This was causing the first input packet to only be sent to the playsim after the first tic occurred.
* Previous: player 1 of 1 (1 nodes); E1L1: Hollywood Holocaust; PlayClock: 4; PlayClock: 4; PlayClock: 12;, etc.
* Current: player 1 of 1 (1 nodes); E1L1: Hollywood Holocaust; PlayClock: 0; PlayClock: 4; PlayClock: 8;, etc.
* Fixes #900 .
2023-03-29 13:20:47 +11:00
Mitchell Richters
7caec5fa69
- Clean out where inputState.ClearAllInput()
is called.
...
* We can do this from just a few places and achieve the same result as having it sprinkled everywhere did.
2023-03-29 09:05:49 +11:00
Mitchell Richters
9f8cda4be3
- Move call to I_GetInputFrac()
to ensure we're never stalled waiting for a tic.
2023-03-29 09:04:40 +11:00
Mitchell Richters
d665037075
- Clean out where Net_ClearFifo()
is called.
...
* We can do this from one place and achieve the same result as having it sprinkled everywhere did.
2023-03-29 09:04:38 +11:00
Mitchell Richters
96055fbc03
- Clean out all games setting gameaction = ga_level
and do it centrally.
2023-03-29 03:10:16 +11:00
Mitchell Richters
9618ba1e78
- Don't serialise player angles twice.
2023-03-28 09:15:58 +11:00
Mitchell Richters
72be2623c3
- Exhumed: Remove useless sectortype
extern pointer.
2023-03-28 08:51:51 +11:00
Mitchell Richters
c6a53265eb
- Exhumed: Misc tidy-ups.
...
* The setting of `Player::bIsFiring` needs to be done before setting a new weapon.
* Tidy up some weird reverse engineering `while (1)` loop which GDX doesn't do.
2023-03-28 08:45:14 +11:00
Mitchell Richters
42d791e7c2
- Exhumed: Fix clip calculation setup.
...
* Since game maintains its own clip capacities, we need to use them instead of the generic handler for the games that do not.
* Clean up the game-side code in `CheckClip()` to use `min()`.
* Repair issue with pistol clip calculation that was using modulo when it shouldn't. A full weapon with 300 will divide into 6 with no remainder, therefore nothing in the clip.
* Fixes #906 .
2023-03-27 22:05:35 +11:00
Mitchell Richters
892dde030f
- Tidy up nested branch in calcChaseCamPos()
.
2023-03-27 20:43:55 +11:00
Mitchell Richters
6c2717fcde
- Avoid testing if we're synchronising input twice in getInput()
.
2023-03-27 20:01:56 +11:00
Mitchell Richters
79745668a6
- Exhumed: Take advantage of getWrappedIndex()
in updatePlayerInventory()
as well.
2023-03-27 18:47:30 +11:00
Mitchell Richters
1ed655e0e7
- Exhumed: Further clean up updatePlayerWeapon()
.
...
* Rename a few variables for better clarity as to what's going on.
* Add new inline to the backend `getWrappedIndex()` that properly wraps around negative values based on the supplied maximum using modulo.
* Directly set the weapon when doing the next/prev tests to avoid unnecessary tests to see whether the player has the weapon or not.
2023-03-27 18:47:05 +11:00
Mitchell Richters
ebedf46434
- Exhumed: Reset view pitch back to 0 when doing Ramses, using game's formula.
...
* Ensure's a smooth return to 0 so the player's actual pitch can be targeted towards Ramses.
* In situations where the player had their view pitch changed in the ticker, this would have never reset.
2023-03-27 18:08:56 +11:00
Mitchell Richters
0594a5cb91
- Exhumed: Properly repair height test after reviewing GDX.
...
* The code in this game is so much tidier to understand what's what...
2023-03-27 18:08:55 +11:00
Mitchell Richters
bd8b033120
- Exhumed: Logic fixes to some underwater tests following review of GDX.
...
* Necessitated a little bit of rearranging in the player ticker but the grouping of all inputs into one function makes sense.
2023-03-27 18:08:55 +11:00
Mitchell Richters
94f188c926
- Exhumed: Restore original grenade pickup code.
...
* When I read this against the generic weapon pickup code, it looked similar enough but the grenade's logic is reversed. That is, after picking up the weapon, equip the player. The generic weapon handler equips the player, then gives them ammo.
* Fixes #904 .
2023-03-27 18:08:55 +11:00
Mitchell Richters
99e23a8d24
- Exhumed: Move Player::nCurrentItem
usage into the right spot.
...
* Originally, `updatePlayerInventory()` was in the main loop and not the player ticker. Now that it's been relocated, this makes sense.
2023-03-27 18:06:35 +11:00
Mitchell Richters
d66f97e5dc
- Exhumed: Clean up weapon selection code a bit.
...
* Concentrate it all in the `updatePlayerWeapon()` function.
2023-03-27 17:08:59 +11:00
Mitchell Richters
cb3fec39df
- Exhumed: Move a line out of doPlayerMovement()
and into updatePlayerViewSector()
.
...
* It needs to come after the function it's been moved into, but its confusing why its calculating a new pos delta when there's one on the stack.
* By directly nesting it in, it's a lot clearer.
2023-03-27 08:36:04 +11:00
Mitchell Richters
d858856e06
- Exhumed: Store a pos delta on the stack in `doPlayerMovement().
...
* We need this in a few places.
* Z is inverted because pitch is negated. Previously I just swapped the operation around.
2023-03-27 08:32:52 +11:00
Mitchell Richters
4fa12a9e30
- Exhumed/SW: Make sure the pitch keys are done after the slope tilting.
...
* Pitch key code does player horizon bounding.
2023-03-27 08:28:32 +11:00
Mitchell Richters
4bf2f70d7b
- Exhumed: Remove Player::nDestVertPan
entirely.
...
* We can just pass the needed value into `doPlayerPitch()`.
* For Ramses, no need to set `nDestVertPan` to the map value, just use the map value.
* Avoids an excess `atan2()` call by way of `maphoriz()`.
2023-03-27 08:14:42 +11:00
Mitchell Richters
b5123ac69f
- Exhumed: Split pitch and yaw input again.
...
* They need to be called in different places inside of `doPlayerMovement()`.
2023-03-27 08:03:35 +11:00
Mitchell Richters
6aceb7bda3
- Exhumed: Clean up some of the repeated sector gets in doPlayerMovement()
.
2023-03-27 08:03:14 +11:00
Mitchell Richters
d45be79c24
- Exhumed: Adjust yaw adjustment for Ramses to use the same formula as pitch.
...
* Rather than just snapping the angle, the player's yaw and pitch move evenly towards Ramses.
2023-03-26 22:13:57 +11:00
Mitchell Richters
b5a9085aed
- Exhumed: Restore more accurate pitch adjustment for Ramses.
...
* Use `maphoriz(-11)` instead of some voodoo degree amount so it's clear when comparing sources.
* Don't stop interpolating while doing Ramses.
* Apply Ramses pitch amount to `nVertDestPan`, just like the original.
* Don't reset all angles when initialising Ramses, just set the yaw angle.
* Don't return player's view to center when doing Ramses, use the delta between `nDestVertPan` and the player's pitch, using same formula as original.
* Comment in how normal/non-ramses `nDestVertPan` setting should be 8x the sprite Z move delta, not 2x. I know it's not correct, but its been this way for a long time and we probably should CVAR it.
* When doing the player's death pitch, it's 40.156 degrees (horizon of 108), not 38 degrees (horizon of 100). This was a misread of mine way back when.
2023-03-26 22:13:57 +11:00
Christoph Oelckers
b6da4ecddf
- backend update from GZDoom.
2023-03-26 11:45:25 +02:00
Mitchell Richters
0840e547b7
- Exhumed: Reset the player actor's pitch with the rest of the actor resets.
2023-03-26 20:12:59 +11:00
Mitchell Richters
1888b7ee9f
- Exhumed: Ensure we back up the player actor's location after doing everything and not mid-way through a reset.
2023-03-26 20:09:43 +11:00
Mitchell Richters
950f4c2c38
- Exhumed: Restore nStandHeight
global and move to Player
struct.
...
* Was dropped in 572869f502
.
* Game's crouch testing necessitates that this value be pre-cached.
* Interestingly, this value is 62.5 whereas the game's view height is 55. Change in late development to make the world feel larger?
2023-03-26 20:06:25 +11:00
Mitchell Richters
fd62f1fb68
Revert "- Exhumed: Increase quake precision in SetQuake()
."
...
This reverts commit fb9ff7d105
.
* The game relies on this being low precision. It was causing a weird tremor in the training map.
2023-03-26 19:52:55 +11:00
Mitchell Richters
71aad07913
- Exhumed: Fix backwards logic from new pitch panning refactor.
...
* From 79f7ca976b
.
* Fixes #901 .
2023-03-26 18:56:01 +11:00
Mitchell Richters
e9a5f745fc
- Duke: Ensure pitch keys are done after adding player's input.
...
* As this function includes the actor's pitch clamp, it's important its done afterwards.
* Setup is already right for all the other games.
2023-03-26 16:40:25 +11:00
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