Commit graph

2200 commits

Author SHA1 Message Date
Christoph Oelckers
27a9def748 - fixed bunny 'run' sequence. 2023-10-08 09:41:17 +02:00
Christoph Oelckers
5ee909ab6f - reduce footprint of the Rot member variable. 2023-10-08 09:41:17 +02:00
Christoph Oelckers
71e44ac7ae patch over the savegame problems with FState. 2023-10-08 09:41:16 +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
4c34f414dc added the remaining needed GetChars calls. 2023-10-08 09:15:32 +02:00
Mitchell Richters
b7702afacf - SW: No need to mark off PlayerArray for saving game-side. 2023-10-05 19:23:33 +11:00
Mitchell Richters
03a69c24b3 - Move syncinput mechanism into GameInput object. 2023-10-05 13:10:47 +11:00
Mitchell Richters
026c9a44e9 - Fix most warnings in Clang under Linux. 2023-10-05 09:57:31 +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
e39002ddb3 - SW: Clean up player accesses in DoGet(). 2023-10-04 12:17:11 +11:00
Mitchell Richters
984ae6b098 - SW: Shorten the setup in DoPlayerVehicleInputScaling(). 2023-10-03 23:07:45 +11: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
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
Mitchell Richters
3c4eb21484 - SW: Remove DSWPlayer::drive_avel, we can just use DCoreActor::lastcmd for this. 2023-10-03 23:07:43 +11:00
Christoph Oelckers
8dc0505a65 made SW's panel sprites into actual DObjects
so that they can a) cleanly be exposed to scripting later and b) serialized for savegames without using gross hacks.
2023-10-03 12:27:15 +02:00
Christoph Oelckers
a8f2af7257 SW: fix serialization of panel sprites 2023-10-03 09:21:08 +02:00
Mitchell Richters
ec69e644f7 - Clean up a bunch of serialisers that were saving vector members, and not the whole vector. 2023-10-03 09:33:28 +11:00
Mitchell Richters
03d957ffdf - Centralise the saving of player actions within DCorePlayer's serialiser. 2023-10-03 09:28:01 +11:00
Mitchell Richters
656cafffb5 - SW: Remove some duplicated save variables. 2023-10-03 09:20: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
Christoph Oelckers
d60834be3d fixed GC handling of players.
These were missing null checks, the player pointers also weren't nulled after deleting the objects.
2023-10-02 19:03:27 +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
16189ff7f9 - Remove GameInterface::getConsoleActor() in place of direct access. 2023-10-02 18:11:53 +11:00
Mitchell Richters
6de8fc91d6 - Remove GameInterface::reapplyInputBits() and directly perform operation in GameTicker(). 2023-10-02 18:11:51 +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
23d4cbc3bd - Remove all game-side PlayerArray[] objects and store within common code. 2023-10-02 15:43:00 +11:00
Mitchell Richters
789c4669f1 - SW: Initial setup to convert PlayerArray array to array of SWPlayer pointers. 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
Mitchell Richters
6a7eabd23f - SW: Rename Player[] array to PlayerArray[] and wrap its access. 2023-10-02 15:42:59 +11:00
Mitchell Richters
2327e08acb - SW: Replace remaining Player + pointer arithmetic with array accesses. 2023-10-02 15:42:58 +11:00
Mitchell Richters
2733c90237 - SW: Replace all pp (.)\= Player \+ (.+)\) with array accesses. 2023-10-02 15:42:58 +11:00
Mitchell Richters
3c499b060f - SW: Replace all pp = Player \+ (.+); with array accesses. 2023-10-02 15:42:58 +11:00
Mitchell Richters
3cc2aa7af4 - SW: Replace remaining Player+ pointer arithmetic with array accesses. 2023-10-02 15:42:57 +11:00
Mitchell Richters
edd089cc0d - SW: Replace Player+pnum pointer arithmetic with array accesses. 2023-10-02 15:42:57 +11:00
Mitchell Richters
6a72b3dd83 - SW: Replace all pp (.)\= Player\+(.+)\) with array accesses. 2023-10-02 15:42:57 +11:00
Mitchell Richters
5d5327c427 - Replace direct pointer access to Player[] array with array accesses. 2023-10-02 15:42:57 +11:00
Mitchell Richters
dbb11eed4d - SW: Rename PLAYER struct to SWPlayer. 2023-10-02 15:42:55 +11:00
Mitchell Richters
a20e2b64f9 - SW: Wrap access to player's actor pointer. 2023-10-02 15:30:35 +11:00
Christoph Oelckers
ee07ae35aa retrieve time in fillSummary. 2023-10-01 12:10:56 +02:00
Christoph Oelckers
4dcf0fd3c4 get rid of the GetStats interface function.
Now that all data it retrieves is available in shared code it is no longer needed.
2023-10-01 11:48:32 +02:00