diff --git a/source/games/exhumed/src/exhumed.cpp b/source/games/exhumed/src/exhumed.cpp index 80546f280..9d83523c6 100644 --- a/source/games/exhumed/src/exhumed.cpp +++ b/source/games/exhumed/src/exhumed.cpp @@ -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; diff --git a/source/games/exhumed/src/init.cpp b/source/games/exhumed/src/init.cpp index ffb645a92..29b85f8df 100644 --- a/source/games/exhumed/src/init.cpp +++ b/source/games/exhumed/src/init.cpp @@ -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); diff --git a/source/games/exhumed/src/input.cpp b/source/games/exhumed/src/input.cpp index e97ca6016..298f0b96b 100644 --- a/source/games/exhumed/src/input.cpp +++ b/source/games/exhumed/src/input.cpp @@ -79,7 +79,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju } else { - lPlayerVel.Zero(); + sPlayerInput[nLocalPlayer].vel.Zero(); } if (!SyncInput()) diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index 6d7df80c9..ef54efd78 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -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) diff --git a/source/games/exhumed/src/player.h b/source/games/exhumed/src/player.h index d0688a10b..767218218 100644 --- a/source/games/exhumed/src/player.h +++ b/source/games/exhumed/src/player.h @@ -40,8 +40,6 @@ enum extern int nLocalPlayer; -extern DVector2 lPlayerVel; - struct PlayerSave { sectortype* pSector;