Commit graph

3474 commits

Author SHA1 Message Date
Christoph Oelckers
13d57cdbd6 use symbolic constant in two places close to the last commit. 2023-11-11 09:51:30 +01:00
Christoph Oelckers
2cf474bddc Duke/RR: fixed player dying when falling from great heights while god mode being on. 2023-11-11 09:45:19 +01:00
Mitchell Richters
f4fee750d5 - Duke: Remove incur_damage() from dispatcher.
* Only used locally within `processinput()` for each game.
2023-11-10 12:00:50 +11:00
Mitchell Richters
7dbd38c84a 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-11-10 12:00:50 +11:00
Mitchell Richters
669a6e8ac0 - Duke: Tidy up return setup in checkp(). 2023-11-10 12:00:50 +11:00
Mitchell Richters
d034d20cd1 - Duke: Use checkp() in ParseState::parse() to remove some duplicated code. 2023-11-10 12:00:50 +11:00
Mitchell Richters
fd394cddad - Duke: Remove a few remaining triple negations missed in 7498be6f5d. 2023-11-10 12:00:49 +11:00
Christoph Oelckers
c19fd602d5 migrate to FTranslationID support
So far this only adapts to the changes in the backend without making further use of this type.
2023-11-09 23:19:48 +01:00
Mitchell Richters
9e1ce2b970 - Clean up some GCC const warnings. 2023-11-05 20:54:17 +11:00
Mitchell Richters
4d7094b63b - Move gi->getCrouchState() into DCorePlayer. 2023-11-05 17:38:10 +11:00
Mitchell Richters
da81b63256 - Clean up some leftover floats in the input code. 2023-11-05 17:38:00 +11:00
Mitchell Richters
ef20d9a48a - Duke: Slight cleanup in drawoverlays(). 2023-11-05 17:38:00 +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
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
8545a2e74d Duke: fixed breakable ceilings. 2023-10-28 10:54:12 +02:00
Christoph Oelckers
6975b95402 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-10-22 23:09:11 +02:00
Christoph Oelckers
04a94f70f7 replace sprintf with snprintf. 2023-10-13 23:06:52 +02:00
Christoph Oelckers
4c34f414dc added the remaining needed GetChars calls. 2023-10-08 09:15:32 +02:00
Mitchell Richters
83d3784007 - Duke: Repair crash when calling OnEvent(EVENT_ENTERLEVEL). 2023-10-06 15:16:02 +11:00
Mitchell Richters
483ebad96a - Duke: Interpolate getavel() since we now have the last packet available to do so. 2023-10-05 13:25:38 +11:00
Mitchell Richters
03a69c24b3 - Move syncinput mechanism into GameInput object. 2023-10-05 13:10:47 +11:00
Mitchell Richters
bd5fff4040 - Duke: Remove casts from setting RR vehicle velocities and consolidate setup into an inline. 2023-10-04 22:05:03 +11:00
Mitchell Richters
7498be6f5d - Duke: Change a few triple negations from the wrapper removal process. 2023-10-04 20:39:37 +11:00
Mitchell Richters
623e453d4d - 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-10-04 19:28:25 +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
79995ba8ce - Duke: Manual sweep for last replacements of GetActor() calls for stack pointer. 2023-10-04 12:13:42 +11:00
Mitchell Richters
c67af979cb - Duke: Manual sweep for last replacements of player index for pointer. 2023-10-04 12:00:04 +11:00
Mitchell Richters
06a7118dcb - Duke: Clean up player/actor accesses in checksectors_*(). 2023-10-04 11:36:47 +11:00
Mitchell Richters
5ddd201b33 - Duke: Clean up player/actor accesses in checkhitswitch() and associated utilities. 2023-10-04 11:32:15 +11:00
Mitchell Richters
b36c6af6cd - Duke: Clean up player/actor accesses in moveclouds(). 2023-10-04 11:21:29 +11:00
Mitchell Richters
2fb1dea9e0 - Duke: Clean up player/actor accesses in checkhitdefault(). 2023-10-04 11:21:17 +11:00
Mitchell Richters
07466f6080 - Duke: Clean up player/actor accesses in doanimations(). 2023-10-04 11:17:56 +11:00
Mitchell Richters
9161d152de - Duke: Clean up player/actor accesses in findplayer utilities. 2023-10-04 11:15:22 +11:00
Mitchell Richters
a2c8066f78 - Duke: Clean up actor accesses in premap.cpp. 2023-10-04 11:07:52 +11:00
Mitchell Richters
89708731a3 - Duke: Clean up actor accesses in player_d.cpp. 2023-10-04 10:57:23 +11:00
Mitchell Richters
9c8b2abf07 - Duke: Clean up player/actor accesses in processinput_*(). 2023-10-04 10:53:56 +11:00
Mitchell Richters
df673952d9 - Duke: Clean up player/actor accesses in processweapon(). 2023-10-04 10:40:20 +11:00
Mitchell Richters
3ee76dee66 - Duke: Clean up player/actor accesses in player_w.cpp. 2023-10-04 10:38:02 +11:00
Mitchell Richters
2c78fba4a2 - Duke: Clean up player/actor accesses in operateweapon(). 2023-10-04 10:30:13 +11:00
Mitchell Richters
f14d7f3612 - Duke: Clean up player/actor accesses in fireweapon(). 2023-10-04 10:25:46 +11:00
Mitchell Richters
e025e0d2a1 - Duke: Clean up player/actor accesses in operateTripbomb(). 2023-10-04 10:22:20 +11:00
Mitchell Richters
c4792b1273 - Duke: Clean up player/actor accesses in movement(). 2023-10-04 10:20:07 +11:00
Mitchell Richters
2d4a1779a5 - Duke: Clean up player/actor accesses in operateJetpack(). 2023-10-04 10:16:15 +11:00
Mitchell Richters
a8f03ed10d - Duke: Clean up actor accesses in player.cpp. 2023-10-03 23:07:50 +11:00
Mitchell Richters
a51521381f - Duke: Clean up player/actor accesses in underwater(). 2023-10-03 23:07:50 +11:00
Mitchell Richters
5d628d712c - Duke: Clean up player/actor accesses in checkp(). 2023-10-03 23:07:50 +11:00