Commit graph

20 commits

Author SHA1 Message Date
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
44be58184b - Repair issue where opening the menu cancels player's pitch returning to centre. 2023-11-05 17:37:58 +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
Mitchell Richters
686b121e45 - Duke: Repair SB_CENTERVIEW not re-applying on the first tic. 2023-10-04 09:27:15 +11:00
Christoph Oelckers
d815eff5d1 fix saving. 2023-10-02 21:38:58 +02:00
Christoph Oelckers
dd2ea96d6c turn players into DObjects and fix several bugs with bad memory access.
* DObjects may not be memset to 0.
* There was still code trying to retrieve the player index with pointer artithmetic. With an array of pointers this does not work.
2023-10-02 21:03:59 +02:00
Mitchell Richters
ac35e09d1c - Move each game's stored nPlayer/pnum value to CorePlayer. 2023-10-02 18:44:04 +11:00
Mitchell Richters
02bd017d07 - Directly set CorePlayer::ucmd rather than copying it to a temporary array. 2023-10-02 17:00:50 +11:00
Mitchell Richters
d90aca9640 - Directly store a ticcmd_t object within CorePlayer. 2023-10-02 17:00:50 +11:00
Mitchell Richters
7953fe7425 - Delete all players upon engine shutdown. 2023-10-02 17:00:50 +11:00
Mitchell Richters
23d4cbc3bd - Remove all game-side PlayerArray[] objects and store within common code. 2023-10-02 15:43:00 +11:00
Mitchell Richters
1604cf009c - Move the actor pointer for each game's player structures into CorePlayer.
* Something strange was going on here with Blood where the static_cast would not work... Moved the player structure into `bloodactor.h` for now to work around it.
2023-10-02 15:42:59 +11:00
Mitchell Richters
6beec5eed2 - Set up initial implementation of CorePlayer struct and make game-side player structs inherit from it. 2023-10-02 15:42:59 +11:00