mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-14 11:50:49 +00:00
- Exhumed: Hide player panning code behind cl_slopetilting
.
* Fixes #303. again.
This commit is contained in:
parent
6cb84dc554
commit
be4fbbf9ec
1 changed files with 9 additions and 7 deletions
|
@ -1032,14 +1032,13 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
|||
StopLocalSound();
|
||||
InitSpiritHead();
|
||||
|
||||
PlayerList[nPlayer].nDestVertPan = q16horiz(0);
|
||||
if (currentLevel->levelNumber == 11)
|
||||
{
|
||||
PlayerList[nPlayer].nDestVertPan = q16horiz(46);
|
||||
PlayerList[nPlayer].horizon.settarget(46);
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerList[nPlayer].nDestVertPan = q16horiz(11);
|
||||
PlayerList[nPlayer].horizon.settarget(11);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1067,7 +1066,7 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
|||
zVelB = -zVelB;
|
||||
}
|
||||
|
||||
if (zVelB > 512 && !PlayerList[nPlayer].horizon.horiz.asq16() && !(sPlayerInput[nPlayer].actions & SB_AIMMODE)) {
|
||||
if (zVelB > 512 && !PlayerList[nPlayer].horizon.horiz.asq16() && cl_slopetilting) {
|
||||
sPlayerInput[nPlayer].actions |= SB_CENTERVIEW;
|
||||
}
|
||||
}
|
||||
|
@ -2665,12 +2664,15 @@ loc_1BD2E:
|
|||
pPlayer->bPlayerPan = false;
|
||||
}
|
||||
|
||||
if (cl_slopetilting)
|
||||
{
|
||||
double nVertPan = (pPlayer->nDestVertPan - pPlayer->horizon.horiz).asq16() * (1. / (FRACUNIT << 2));
|
||||
if (nVertPan != 0)
|
||||
{
|
||||
pPlayer->horizon.addadjustment(abs(nVertPan) >= 4 ? clamp(nVertPan, -4, 4) : nVertPan * 2.);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // else, player's health is less than 0
|
||||
{
|
||||
// loc_1C0E9
|
||||
|
|
Loading…
Reference in a new issue