- got rid of lPlayerVel

This commit is contained in:
Christoph Oelckers 2022-09-11 13:21:00 +02:00
parent f16f9b302f
commit fdeb060ccd
5 changed files with 5 additions and 10 deletions

View file

@ -371,6 +371,8 @@ void GameInterface::Ticker()
{ {
inita = inita.Normalized360(); inita = inita.Normalized360();
auto& lPlayerVel = sPlayerInput[nLocalPlayer].vel;
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {
// Velocities are stored as Q14.18 // Velocities are stored as Q14.18
@ -472,7 +474,6 @@ void GameInterface::Ticker()
sPlayerInput[nLocalPlayer].actions = localInput.actions; sPlayerInput[nLocalPlayer].actions = localInput.actions;
if (oldactions & SB_CENTERVIEW) sPlayerInput[nLocalPlayer].actions |= SB_CENTERVIEW; if (oldactions & SB_CENTERVIEW) sPlayerInput[nLocalPlayer].actions |= SB_CENTERVIEW;
sPlayerInput[nLocalPlayer].vel = lPlayerVel;
sPlayerInput[nLocalPlayer].buttons = lLocalCodes; sPlayerInput[nLocalPlayer].buttons = lLocalCodes;
sPlayerInput[nLocalPlayer].pTarget = bestTarget; sPlayerInput[nLocalPlayer].pTarget = bestTarget;
sPlayerInput[nLocalPlayer].nAngle = localInput.avel; sPlayerInput[nLocalPlayer].nAngle = localInput.avel;

View file

@ -191,7 +191,6 @@ void InitLevel(MapRecord* map)
ResetEngine(); ResetEngine();
totalmoves = 0; totalmoves = 0;
GrabPalette(); GrabPalette();
lPlayerVel.Zero();
if (!mus_redbook && map->music.IsNotEmpty()) Mus_Play(map->music, true); // Allow non-CD music if defined for the current level if (!mus_redbook && map->music.IsNotEmpty()) Mus_Play(map->music, true); // Allow non-CD music if defined for the current level
playCDtrack(map->cdSongId, true); playCDtrack(map->cdSongId, true);

View file

@ -79,7 +79,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
} }
else else
{ {
lPlayerVel.Zero(); sPlayerInput[nLocalPlayer].vel.Zero();
} }
if (!SyncInput()) if (!SyncInput())

View file

@ -42,7 +42,6 @@ BEGIN_PS_NS
extern int nStatusSeqOffset; extern int nStatusSeqOffset;
DVector2 lPlayerVel;
int obobangle = 0, bobangle = 0; int obobangle = 0, bobangle = 0;
static actionSeq PlayerSeq[] = { static actionSeq PlayerSeq[] = {
@ -1082,8 +1081,7 @@ void AIPlayer::Tick(RunListEvent* ev)
PlayerList[nPlayer].horizon.settarget(buildhoriz(0), true); PlayerList[nPlayer].horizon.settarget(buildhoriz(0), true);
lPlayerVel.Zero(); sPlayerInput[nPlayer].vel.Zero();
pPlayerActor->vel.Zero(); pPlayerActor->vel.Zero();
if (nFreeze < 1) if (nFreeze < 1)
@ -2748,8 +2746,7 @@ void SerializePlayer(FSerializer& arc)
{ {
if (arc.BeginObject("player")) if (arc.BeginObject("player"))
{ {
arc("lvel", lPlayerVel) arc ("bobangle", bobangle)
("bobangle", bobangle)
("standheight", nStandHeight) ("standheight", nStandHeight)
("playercount", PlayerCount) ("playercount", PlayerCount)
("netstartsprites", nNetStartSprites) ("netstartsprites", nNetStartSprites)

View file

@ -40,8 +40,6 @@ enum
extern int nLocalPlayer; extern int nLocalPlayer;
extern DVector2 lPlayerVel;
struct PlayerSave struct PlayerSave
{ {
sectortype* pSector; sectortype* pSector;