Commit graph

2852 commits

Author SHA1 Message Date
Christoph Oelckers
9367394809 fix ChangeLevel when called for ending the game. 2023-12-05 22:40:59 +01:00
Mitchell Richters
417b7a20ad - Fix pitch clamping for GameInput::getInput(). 2023-12-05 22:40:59 +01:00
Christoph Oelckers
2e80c3034f we're past 1.8 now 2023-12-05 22:40:59 +01:00
Christoph Oelckers
63ea4dfbba bump savegame version. 2023-12-05 22:40:59 +01:00
Christoph Oelckers
c06e795703 use FTranslationID in the 2D drawer. 2023-12-05 22:40:57 +01:00
Christoph Oelckers
0265d37fdb use FTranslationID in the model code. 2023-12-05 22:40:56 +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
Christoph Oelckers
6df1a14a92 gave translations a dedicated scripted type.
This is needed for implementing reliable serialization of custom translations. As long as they are merely ints they cannot be restored on loading a savegame because the serialization code does not know that these variables are special.
2023-12-05 22:40:56 +01:00
Christoph Oelckers
6c702847ff Backend update from GZDoom. 2023-12-05 22:39:34 +01:00
Mitchell Richters
aea71092cc - Clean up some GCC const warnings. 2023-12-05 22:39:33 +01:00
Mitchell Richters
be101bfc6c - Change paused check in 433c051751ebdf3b9d82ec4cabf01122414de961 as to not affect the crouch_toggle while paused. 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
1608c331a7 - Fix bad indentation in searchpaths.cpp. 2023-12-05 22:39:33 +01:00
Mitchell Richters
c989d4c3a4 - statFPS() doesn't need to be in GameInterface. 2023-12-05 22:39:32 +01:00
Mitchell Richters
085aefb1a5 - Repair issue where opening the menu cancels player's pitch returning to centre. 2023-12-05 22:39:32 +01:00
Mitchell Richters
b5da574613 - Remove some leftover debug code. 2023-12-05 22:39:32 +01:00
Mitchell Richters
08d808089f - Simplify some vector math in calcChaseCamPos(). 2023-12-05 22:39:31 +01:00
Mitchell Richters
ac91a70950 - Remove some unnecessary casts in SetupViewpoint(). 2023-12-05 22:39:31 +01:00
Mitchell Richters
98046afa28 - Consolidate player coord stat/CCMD into coreplayer.cpp. 2023-12-05 22:39:31 +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
fcc09afa18 - Consolidate Exhumed's nCamerapos and SW's DSWPlayer::si into something inside DCorePlayer. 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
8aa34eea7b renamed $conreserve to $resourceid.
This better matches its use, especially since it is not exclusive to CON supporting games.
2023-12-05 22:39:30 +01:00
Christoph Oelckers
c12b94cf48 fix handling of super secrets in statistics code. 2023-12-05 22:39:29 +01:00
Christoph Oelckers
b67f2cb727 added some awful hackery to handle the different offsetting of Blood's native voxels vs. those imported via .DEF. 2023-12-05 22:39:29 +01:00
Christoph Oelckers
6229a6256c fix compilation of release builds. 2023-12-05 22:39:28 +01:00
Mitchell Richters
395a4e5421 - Apply last remaining .GetChars() fixes for POSIX targets. 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
Christoph Oelckers
7cffe6e3f0 a few Getchars 2023-12-05 22:39:26 +01:00
Mitchell Richters
7ba5d22d5d - Bump MAXVOXELS from 1024 to 2048. 2023-12-05 22:39:26 +01:00
Mitchell Richters
d3811c7816 - Add getTicrateAngle() to reduce the amount of times DAngle::fromDeg() needs to be called in input code. 2023-12-05 22:39:26 +01:00
Mitchell Richters
2ddd15b932 - Slight clean-up in gameinput.cpp. 2023-12-05 22:39:25 +01:00
Mitchell Richters
ddd39775e6 - Re-add lost paused check in GameInput::GetInput(). 2023-12-05 22:39:25 +01:00
Mitchell Richters
1e6ee7ee61 - Remove unnecessary clamp in PlayerAngles::doViewPitch(). 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
0f1f3d804f - Use DCorePlayer::GetActor() inside of CCMD(warptocoords). 2023-12-05 22:39:23 +01:00
Mitchell Richters
0c13d4fe3a - Fix most GCC warnings in the backend/common code code.
* Most of them were just signedness issues. Hopefully I got everything right here.
* 3rd party stuff deliberately not touched.
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
18f362d68e - Add player's view angles to stat coord. 2023-12-05 22:39:19 +01:00
Mitchell Richters
561d756baa - Duke: Repair SB_CENTERVIEW not re-applying on the first tic. 2023-12-05 22:39:18 +01:00
Mitchell Richters
a6396cb491 - Centralise input clamping to occur centrally when the engine requests a packet. 2023-12-05 22:39:18 +01:00
Christoph Oelckers
60a36f4902 fix Vectoe3 clamp for real. 2023-12-05 22:39:17 +01:00
Mitchell Richters
e8451d3ddb - Take better advantage of InputPacket::ang's FRotator status.
* Change it to a DRotator as that's what the game is expecting. Too many narrowings against DAngle objects needed.
* Utilise object methods where possible.
* Do all math against the object where possible, not its members.
2023-12-05 22:39:13 +01:00
Mitchell Richters
af8f3139ed - Change InputPacket angles to an FRotator. 2023-12-05 22:39:12 +01:00
Mitchell Richters
3eaf7d2b87 - Make the last commit compile. 2023-12-05 22:39:12 +01:00
Mitchell Richters
e2a949949c - Take better advantage of InputPacket::vel's FVector3 status.
* Change it to a DVector3 as that's what the game is expecting. Too many narrowings against DAngle objects needed.
* Utilise object methods where possible.
* Do all math against the object where possible, not its members.
2023-12-05 22:39:12 +01:00