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

View file

@ -191,7 +191,6 @@ void InitLevel(MapRecord* map)
ResetEngine();
totalmoves = 0;
GrabPalette();
lPlayerVel.Zero();
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);

View file

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

View file

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

View file

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