Commit graph

2855 commits

Author SHA1 Message Date
Mitchell Richters
4d7094b63b - Move gi->getCrouchState() into DCorePlayer. 2023-11-05 17:38:10 +11:00
Mitchell Richters
8705afc223 - Fix bad indentation in searchpaths.cpp. 2023-11-05 17:38:01 +11:00
Mitchell Richters
5220a57f78 - statFPS() doesn't need to be in GameInterface. 2023-11-05 17:38:00 +11:00
Mitchell Richters
44be58184b - Repair issue where opening the menu cancels player's pitch returning to centre. 2023-11-05 17:37:58 +11:00
Mitchell Richters
ffe921ca3b - Remove some leftover debug code. 2023-11-04 19:10:06 +11:00
Mitchell Richters
7c93d5127b - Simplify some vector math in calcChaseCamPos(). 2023-11-04 19:10:06 +11:00
Mitchell Richters
0d0f5af3fe - Remove some unnecessary casts in SetupViewpoint(). 2023-11-04 19:10:06 +11:00
Mitchell Richters
210ebefd3d - Consolidate player coord stat/CCMD into coreplayer.cpp. 2023-11-04 19:10:05 +11:00
Mitchell Richters
0bbfe81a92 - 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-11-04 19:10:05 +11:00
Mitchell Richters
bd3184cf49 - Consolidate Exhumed's nCamerapos and SW's DSWPlayer::si into something inside DCorePlayer. 2023-11-04 19:10:05 +11:00
Mitchell Richters
7921eedda2 - Interalise slope tilting checks for DCorePlayer::doViewPitch(). 2023-11-04 19:10:05 +11:00
Mitchell Richters
cf2f3e20f8 - 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-11-04 19:10:04 +11:00
Mitchell Richters
3d7b742bed - Internalise player InputPacket access. 2023-11-04 19:10:03 +11:00
Mitchell Richters
3625a6af52 - Move PlayerAngles class directly into DCorePlayer.
* No refactoring around it yet.
* The #includes could use some cleaning up...
2023-11-04 19:10:03 +11:00
Christoph Oelckers
1b6454dc5b renamed $conreserve to $resourceid.
This better matches its use, especially since it is not exclusive to CON supporting games.
2023-10-28 09:06:36 +02:00
Christoph Oelckers
4135e460e2 fix handling of super secrets in statistics code. 2023-10-26 20:54:09 +02:00
Christoph Oelckers
bb6bb85508 added some awful hackery to handle the different offsetting of Blood's native voxels vs. those imported via .DEF. 2023-10-26 19:28:49 +02:00
Christoph Oelckers
b1538ca3ec fix compilation of release builds. 2023-10-13 23:07:30 +02:00
Mitchell Richters
13b792e953 - Apply last remaining .GetChars() fixes for POSIX targets. 2023-10-13 23:06:51 +02:00
Christoph Oelckers
c4ded2f133 - compile the states. 2023-10-08 10:06:57 +02:00
Christoph Oelckers
a1cbeb1b0d migrate to engine states.
Savegames do not work for this yet.
2023-10-08 09:41:16 +02:00
Christoph Oelckers
031fb2ea4e - SW: refactored states to use a Doom-like state model. 2023-10-08 09:41:16 +02:00
Christoph Oelckers
6250906879 implemented proper handling of VM functions as identifiers. 2023-10-08 09:41:15 +02:00
Christoph Oelckers
11f094c7fb reference event callbacks by name, not by internal index.
This is needed to allow writing new callbacks.
2023-10-08 09:41:15 +02:00
Christoph Oelckers
cb443d443c Blood projectile scriptification. 2023-10-08 09:41:14 +02:00
Christoph Oelckers
9340f39053 use the actor's metadata in PickupAmmo
This allows removing the AmmoItemData array.
Also make some tweaks to handle the nnext extension for customizable ammo amount given. Instead of tying it to gModernMap this now also uses a feature flag that will later be exposed to RMAPINFO.
2023-10-08 09:41:11 +02:00
Christoph Oelckers
64d8fd6072 Blood: scriptified item spawning
This was merely a testbed with a limited amount of code, the biggest gain here is that the spawning no longer depends on item IDs but classes so new ones can be added later.
2023-10-08 09:41:11 +02:00
Christoph Oelckers
4c34f414dc added the remaining needed GetChars calls. 2023-10-08 09:15:32 +02:00
Christoph Oelckers
a2b93fdc23 a few Getchars 2023-10-08 08:09:05 +02:00
Mitchell Richters
6b35be636a - Bump MAXVOXELS from 1024 to 2048. 2023-10-08 08:18:05 +11:00
Mitchell Richters
961770ea31 - Add getTicrateAngle() to reduce the amount of times DAngle::fromDeg() needs to be called in input code. 2023-10-08 08:17:40 +11:00
Mitchell Richters
a179527209 - Slight clean-up in gameinput.cpp. 2023-10-05 19:23:33 +11:00
Mitchell Richters
35aa81d912 - Re-add lost paused check in GameInput::GetInput(). 2023-10-05 15:08:24 +11:00
Mitchell Richters
29fc1240b4 - Remove unnecessary clamp in PlayerAngles::doViewPitch(). 2023-10-05 13:25:02 +11:00
Mitchell Richters
03a69c24b3 - Move syncinput mechanism into GameInput object. 2023-10-05 13:10:47 +11:00
Mitchell Richters
98e83fcc3a - Use DCorePlayer::GetActor() inside of CCMD(warptocoords). 2023-10-04 19:32:24 +11:00
Mitchell Richters
7e3a1dfb1e - 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-10-04 19:28:26 +11:00
Mitchell Richters
94e23343e1 - Store scaleAdjust directly inside the GameInput object. 2023-10-04 19:28:25 +11:00
Mitchell Richters
80dd01aef0 - Remove GameInput friendships inside PlayerAngles in lieu of a local inline function. 2023-10-04 19:28:25 +11:00
Mitchell Richters
cf38a7b1c1 - Add player's view angles to stat coord. 2023-10-04 09:51:20 +11:00
Mitchell Richters
686b121e45 - Duke: Repair SB_CENTERVIEW not re-applying on the first tic. 2023-10-04 09:27:15 +11:00
Mitchell Richters
fd07347bce - Centralise input clamping to occur centrally when the engine requests a packet. 2023-10-04 08:56:19 +11:00
Christoph Oelckers
77f61004c3 fix Vectoe3 clamp for real. 2023-10-03 14:57:17 +02:00
Mitchell Richters
d6de57095d - 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-10-03 23:07:45 +11:00
Mitchell Richters
1732cd2e83 - Change InputPacket angles to an FRotator. 2023-10-03 23:07:45 +11:00
Mitchell Richters
95fc2ac6f1 - Make the last commit compile. 2023-10-03 23:07:45 +11:00
Mitchell Richters
f88d435335 - 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-10-03 23:07:44 +11:00
Mitchell Richters
828e46a8da - Remove the TVector2 (const TVector3<vec_t> &other) constructor.
* This narrowing constructor was causing a problem with a `clamp()` overload in the next commit.
* Believe this is a product of a by-gone time before we had the `XY()` method on `TVector3<T>` objects.
2023-10-03 23:07:44 +11:00
Mitchell Richters
f570cb5d21 - Change InputPacket velocities to an FVector3. 2023-10-03 23:07:44 +11:00
Mitchell Richters
6cff02d33b - SW: Consistently apply SOP angle scaling to pitch as well as yaw. 2023-10-03 23:07:43 +11:00