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
63ba784d55
- SW: Reduce some line lengths in DoPlayerVehicleInputScaling()
.
2023-11-04 19:10:06 +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
04a94f70f7
replace sprintf with snprintf.
2023-10-13 23:06:52 +02:00
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