Merge branch 'master' into newrenderer

This commit is contained in:
Mitchell Richters 2021-04-19 20:50:37 +10:00
commit 2f696e1a95
3 changed files with 8 additions and 13 deletions

View file

@ -232,6 +232,7 @@ DEFINE_ACTION_FUNCTION(FSavegameManager, LoadSavegame)
void FSavegameManagerBase::DoSave(int Selected, const char *savegamestring)
{
RemoveNewSaveNode();
if (Selected != 0)
{
auto node = SaveGames[Selected];

View file

@ -755,7 +755,7 @@ static void processVehicleInput(player_struct *p, ControlInfo* const hidInput, I
input.avel = boatApplyTurn(p, hidInput, kbdLeft, kbdRight, scaleAdjust);
}
input.fvel = clamp(xs_CRoundToInt(p->MotoSpeed), -(MAXVELMOTO >> 3), MAXVELMOTO);
loc.fvel = clamp(xs_CRoundToInt(p->MotoSpeed), -(MAXVELMOTO >> 3), MAXVELMOTO);
input.avel *= BAngToDegree;
loc.avel += input.avel;
}

View file

@ -2638,7 +2638,12 @@ loc_1BD2E:
Player* pPlayer = &PlayerList[nPlayer];
if (actions & (SB_LOOK_UP | SB_LOOK_DOWN))
if (SyncInput())
{
pPlayer->horizon.sethorizon(sPlayerInput[nPlayer].pan, &sPlayerInput[nLocalPlayer].actions);
}
if (actions & (SB_LOOK_UP | SB_LOOK_DOWN) || sPlayerInput[nPlayer].pan)
{
pPlayer->nDestVertPan = pPlayer->horizon.horiz;
pPlayer->bPlayerPan = pPlayer->bLockPan = true;
@ -2649,17 +2654,6 @@ loc_1BD2E:
pPlayer->bPlayerPan = pPlayer->bLockPan = false;
}
if (SyncInput())
{
pPlayer->horizon.sethorizon(sPlayerInput[nPlayer].pan, &sPlayerInput[nLocalPlayer].actions);
}
if (sPlayerInput[nPlayer].pan)
{
pPlayer->nDestVertPan = pPlayer->horizon.horiz;
pPlayer->bPlayerPan = pPlayer->bLockPan = true;
}
if (totalvel[nPlayer] > 20)
{
pPlayer->bPlayerPan = false;