Commit graph

1847 commits

Author SHA1 Message Date
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
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
f68c168ae4 - Blood: Delete empty file that got missed. 2023-03-23 20:36:37 +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
88e6a6e894 - Rework ff652f454c slightly to accept an InputPacket pointer. 2023-03-22 20:08:53 +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
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
bd3e9b305e - Adjust signatures of input functions slightly for consistency. 2023-03-18 19:29:29 +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
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
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
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
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
07a82508fa - Blood: Fix palette of actor sprite on 2D automap.
* Fixes #846.
2023-03-15 22:22:52 +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
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
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
Mitchell Richters
991ef5c27f - Minor input tidy-up. 2023-02-04 17:05:18 +11:00
Christoph Oelckers
8052bc7e46 - fixed bad vector addition to incorrect variable. 2023-01-29 09:05:35 +01:00
Christoph Oelckers
dce0afe499 - Blood: fixed application of push velocity. 2023-01-28 12:43:46 +01:00
Christoph Oelckers
fc547f5ada - Blood: fixed bad array resize. 2023-01-28 10:59:27 +01:00
Christoph Oelckers
3b8956c728 - Blood: make sure that tracking condition data is always properly initialized. 2023-01-28 10:11:34 +01:00
Christoph Oelckers
19a58ddeb0 - Blood: fixed velocity for ejected shell casings. 2023-01-21 14:33:42 +01:00
Christoph Oelckers
9cc7f90410 - Blood: reverted GetSpriteExtents to integer math.
The change in precision was enough to make the game misbehave.
2023-01-21 13:56:14 +01: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
Christoph Oelckers
f6ff02c51e - Blood: fixed incorrect defaults for relative sound volume in two places 2023-01-18 06:58:37 +01:00
Christoph Oelckers
bb7f00988a - give Blood's sounds well defined names so they can be defined via SNDINFO. 2023-01-15 16:15:28 +01:00
Mitchell Richters
c7d2a64af0 - Blood: Use nullAngle in one place. 2023-01-13 09:03:02 +11:00
Mitchell Richters
c606fc11da - Add call to resetForcedSyncInput() for all games.
* Blood was missing it.
* If it's pre-added to all games, it never needs thinking about.
2023-01-12 18:59:32 +11:00
Christoph Oelckers
b7799a5a3c - fix kill counter in Blood (for real this time.) 2023-01-08 20:12:28 +01:00
Christoph Oelckers
d7d4bfe04b - Blood: use a 3D unit vector to set Blood's projectile velocity. 2023-01-08 19:16:58 +01:00
Christoph Oelckers
7cf13ed158 - fixed bad angle math in cl_showweapon handler. 2023-01-06 17:22:21 +01:00
Mitchell Richters
1d0e9b369e - Blood: Fix bad spawned actor angle for actFireMissile().
* Originating from a8cc6c1189.
* Fixes #837.
2023-01-06 17:55:40 +11:00
Mitchell Richters
1438bb5e80 - Blood: Ensure actor's XY pos is updated before calling Z slope utils.
* Originates from efc832ca5c.
* Fixes #833.
2023-01-06 17:08:56 +11:00
Mitchell Richters
676cdba259 - Blood: Adjust VDoorBusy() setup from e133985fa0.
* Changes to case 3 while visibly different, actually equates to the same algorithm for case 0.
* Revert case 3 back to original condition and send through 0 to `ZTranslateSector()` in `VDoorBusy()` if its 3 and we're not vanilla.
2023-01-05 20:59:14 +11:00
Mitchell Richters
a36cb45421 - Blood: Add VanillaMode() test to previous commit. 2023-01-03 09:01:37 +11:00
Mitchell Richters
e133985fa0 - Blood: Adjust sine wave in GetWaveValue for 4th type to use full curve of the wave.
* Initial setup would cause a very abrupt stop when coming to the top of an elevator, such as the one in E1M5.
* This would continue for an abrupt fall, causing the floor to essentially give out underneath the player or a dude actor.
* Lengthened wave allows the wave to start off softly and finish softly, with the elevator fastest in the middle of motion.
* Fixes #778.
2023-01-02 23:42:37 +11:00
Mitchell Richters
95f05d51c5 - Blood: Increase precision of values used within GetWaveValue(). 2023-01-02 23:26:54 +11:00
Mitchell Richters
30cacb1a70 - Blood: Fix bad cherry pick in bcd2d82bc7. 2023-01-02 19:33:51 +11:00
bcd2d82bc7 - Blood: Allow fire button to be used for tnt/spray throw
Prevent alt fire blocking fire button for tnt/spray can throwing

* Advised of fix to Raze here: https://github.com/nukeykt/NBlood/pull/654#issuecomment-1253886969
* Fixes #671.
2023-01-02 19:24:38 +11:00