Commit graph

3480 commits

Author SHA1 Message Date
Mitchell Richters
1da71c3ca8 - Rename DCorePlayer::StrafeVel to DCorePlayer::RollVel as it better matches its usage. 2024-01-05 20:59:28 +11:00
Mitchell Richters
d25f6597b8 - Move DCorePlayer::resetCameraAngles() call from each game into GameInput::getInput(). 2024-01-05 20:59:28 +11:00
Mitchell Richters
e58d5f7637 - Move GameInput::ResetInputSync() call from each game into GameInput::getInput(). 2024-01-05 20:59:27 +11:00
Christoph Oelckers
b72fcd5185 converted files to UTF-8 2024-01-04 18:29:28 +01:00
Christoph Oelckers
9315c8b307 fixed autoaiming.
The WW2GI pistol check was completely wrong. :(
2023-12-30 09:07:32 +01:00
Christoph Oelckers
2efb8ffc5c RR: fixed secret trigger reporting. 2023-12-06 21:02:55 +01:00
Christoph Oelckers
3590dde6df Duke: remove setting the xflip flag for sprites rendered in a mirror
The new renderer handles this internally so this flag will just un-flip the sprite again.
2023-12-05 22:40:59 +01:00
Mitchell Richters
376b695fb6 - Duke: Fix missed symbolic constant from 13d57cdbd6. 2023-12-05 22:40:58 +01:00
Christoph Oelckers
4133c4602c use symbolic constant in two places close to the last commit. 2023-12-05 22:40:58 +01:00
Christoph Oelckers
712ea95203 Duke/RR: fixed player dying when falling from great heights while god mode being on. 2023-12-05 22:40:58 +01:00
Mitchell Richters
bd915763c2 - Duke: Remove incur_damage() from dispatcher.
* Only used locally within `processinput()` for each game.
2023-12-05 22:40:58 +01:00
Mitchell Richters
834fed369b Revert "- clamp player sprite's xvel between 0 and 512 to stop it going into the negative with rapid posx/posy changes due to teleporting."
This reverts commit cf548e055e.

* Shouldn't be necessary now with doubles instead of integers for coordinates.
* Affected spot in commit message appears fine upon testing.
2023-12-05 22:40:57 +01:00
Mitchell Richters
977d562c57 - Duke: Tidy up return setup in checkp(). 2023-12-05 22:40:57 +01:00
Mitchell Richters
b5bb747f61 - Duke: Use checkp() in ParseState::parse() to remove some duplicated code. 2023-12-05 22:40:57 +01:00
Mitchell Richters
7b030cef20 - Duke: Remove a few remaining triple negations missed in 7498be6f5d. 2023-12-05 22:40:57 +01:00
Christoph Oelckers
4cb3b96ddf migrate to FTranslationID support
So far this only adapts to the changes in the backend without making further use of this type.
2023-12-05 22:40:56 +01:00
Mitchell Richters
aea71092cc - Clean up some GCC const warnings. 2023-12-05 22:39:33 +01:00
Mitchell Richters
be41bbcd28 - Move gi->getCrouchState() into DCorePlayer. 2023-12-05 22:39:33 +01:00
Mitchell Richters
f219ee0208 - Clean up some leftover floats in the input code. 2023-12-05 22:39:32 +01:00
Mitchell Richters
73e68705da - Duke: Slight cleanup in drawoverlays(). 2023-12-05 22:39:32 +01:00
Mitchell Richters
f22b6b95d2 - Remove DCorePlayer::getCameraAngles().
* `CameraAngles` used to be private within `PlayerAngles` and accessed via a friendship with `GameInput`.
* Just make it public for now, its not worth the complex setup to protect against this as we can control access by simply not exporting it to ZScript.
2023-12-05 22:39:31 +01:00
Mitchell Richters
1c725377ea - Interalise slope tilting checks for DCorePlayer::doViewPitch(). 2023-12-05 22:39:31 +01:00
Mitchell Richters
59366d3ffc - Internalise player velocity setup for DCorePlayer::doRollInput().
* Would have been nice to have this constexpr, but can only do that when we switch to C++20.
2023-12-05 22:39:30 +01:00
Mitchell Richters
ce75f7d7ef - Internalise player InputPacket access. 2023-12-05 22:39:30 +01:00
Mitchell Richters
531c95c7ca - Move PlayerAngles class directly into DCorePlayer.
* No refactoring around it yet.
* The #includes could use some cleaning up...
2023-12-05 22:39:30 +01:00
Christoph Oelckers
62c471e225 Duke: fixed breakable ceilings. 2023-12-05 22:39:30 +01:00
Christoph Oelckers
9f2808df1f Duke fixed two issues with displaying incorrect sprites
* We cannot check a projectiles owner because it may have been destroyed, so copy all info over
* CON changing an actor's type to one without class did not do anything at all.
2023-12-05 22:39:28 +01:00
Christoph Oelckers
54035f9396 replace sprintf with snprintf. 2023-12-05 22:39:27 +01:00
Christoph Oelckers
0c397033f1 added the remaining needed GetChars calls. 2023-12-05 22:39:27 +01:00
Mitchell Richters
31bb7d3348 - Duke: Repair crash when calling OnEvent(EVENT_ENTERLEVEL). 2023-12-05 22:39:25 +01:00
Mitchell Richters
11d9739707 - Duke: Interpolate getavel() since we now have the last packet available to do so. 2023-12-05 22:39:24 +01:00
Mitchell Richters
52b20e1f59 - Move syncinput mechanism into GameInput object. 2023-12-05 22:39:24 +01:00
Mitchell Richters
7e393e04a5 - Duke: Remove casts from setting RR vehicle velocities and consolidate setup into an inline. 2023-12-05 22:39:24 +01:00
Mitchell Richters
6a06df0e45 - Duke: Change a few triple negations from the wrapper removal process. 2023-12-05 22:39:24 +01:00
Mitchell Richters
526db7f8b0 - Fix all GCC warnings in the game-side code.
* Most of these were due to mixed spaces/tabs playing nastiness with non-braced if/else statements.
2023-12-05 22:39:23 +01:00
Mitchell Richters
084be1a45c - Store scaleAdjust directly inside the GameInput object. 2023-12-05 22:39:23 +01:00
Mitchell Richters
bdf566b348 - Remove GameInput friendships inside PlayerAngles in lieu of a local inline function. 2023-12-05 22:39:23 +01:00
Mitchell Richters
63605f034d - Duke: Manual sweep for last replacements of GetActor() calls for stack pointer. 2023-12-05 22:39:21 +01:00
Mitchell Richters
66a77ea860 - Duke: Manual sweep for last replacements of player index for pointer. 2023-12-05 22:39:21 +01:00
Mitchell Richters
0615eba516 - Duke: Clean up player/actor accesses in checksectors_*(). 2023-12-05 22:39:21 +01:00
Mitchell Richters
48f1be7e0c - Duke: Clean up player/actor accesses in checkhitswitch() and associated utilities. 2023-12-05 22:39:21 +01:00
Mitchell Richters
b5f2357949 - Duke: Clean up player/actor accesses in moveclouds(). 2023-12-05 22:39:21 +01:00
Mitchell Richters
2de143214b - Duke: Clean up player/actor accesses in checkhitdefault(). 2023-12-05 22:39:20 +01:00
Mitchell Richters
4b410d48ba - Duke: Clean up player/actor accesses in doanimations(). 2023-12-05 22:39:20 +01:00
Mitchell Richters
5f132f5cda - Duke: Clean up player/actor accesses in findplayer utilities. 2023-12-05 22:39:20 +01:00
Mitchell Richters
60228e10c6 - Duke: Clean up actor accesses in premap.cpp. 2023-12-05 22:39:20 +01:00
Mitchell Richters
7401bf4c6f - Duke: Clean up actor accesses in player_d.cpp. 2023-12-05 22:39:20 +01:00
Mitchell Richters
4464497c28 - Duke: Clean up player/actor accesses in processinput_*(). 2023-12-05 22:39:20 +01:00
Mitchell Richters
32d294fed0 - Duke: Clean up player/actor accesses in processweapon(). 2023-12-05 22:39:20 +01:00
Mitchell Richters
0c7450bdb7 - Duke: Clean up player/actor accesses in player_w.cpp. 2023-12-05 22:39:19 +01:00