- WHaven: Uplift gi->GetInput() to work after merging.

This commit is contained in:
Mitchell Richters 2021-11-27 23:18:27 +11:00 committed by Christoph Oelckers
parent 0ccf2bb9ef
commit 8f4cd93023
3 changed files with 6 additions and 7 deletions

View file

@ -79,11 +79,11 @@ struct PlayerHorizon
void scaletozero(fixedhoriz& object, double const value, double const scaleAdjust, double const push = 0.)
{
if (object.asq16())
{
{
auto sgn = Sgn(object.asq16());
object -= getscaledhoriz(value, scaleAdjust, &object, push == 0 ? sgn * (1. / 3.) : push);
if (sgn != Sgn(object.asq16())) object = q16horiz(0);
}
}
}
// Ticrate playsim adjustment processor.
@ -199,11 +199,11 @@ struct PlayerAngle
void scaletozero(binangle& object, double const value, double const scaleAdjust, double const push = 0.)
{
if (object.asbam())
{
{
auto sgn = Sgn(object.signedbam());
object -= getscaledangle(value, scaleAdjust, &object, push == 0 ? sgn * (1. / 3.) : push);
if (sgn != Sgn(object.signedbam())) object = bamang(0);
}
}
}
// Ticrate playsim adjustment processor.

View file

@ -93,7 +93,7 @@ static void UpdatePlayerSpriteAngle(PLAYER& plr)
plr.actor()->s().ang = plr.angle.ang.asbuild();
}
void GameInterface::GetInput(InputPacket* packet, ControlInfo* const hidInput)
void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdjust, InputPacket* packet)
{
if (paused || M_Active())
{
@ -112,7 +112,6 @@ void GameInterface::GetInput(InputPacket* packet, ControlInfo* const hidInput)
if (plr.dead) localInput.actions &= SB_OPEN;
}
double const scaleAdjust = InputScale();
InputPacket input{};
if (!plr.dead)

View file

@ -527,7 +527,7 @@ struct GameInterface : public ::GameInterface
FString GetCoordString() override;
//void ExitFromMenu() override;
//void DrawPlayerSprite(const DVector2& origin, bool onteam) override;
void GetInput(InputPacket* packet, ControlInfo* const hidInput) override;
void GetInput(ControlInfo* const hidInput, double const scaleAdjust, InputPacket* packet) override;
void UpdateSounds() override;
void Startup() override;
void DrawBackground() override;