mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- Exhumed: Hooked up tic-rate input helpers. Also removed nDestVertPan[]
.
This commit is contained in:
parent
8a4d4b6905
commit
fa1ce1c021
7 changed files with 31 additions and 44 deletions
|
@ -421,19 +421,6 @@ void GameInterface::Ticker()
|
|||
}
|
||||
}
|
||||
|
||||
if (localInput.actions & SB_CENTERVIEW)
|
||||
{
|
||||
bLockPan = false;
|
||||
bPlayerPan = false;
|
||||
//PlayerList[nLocalPlayer].q16horiz = IntToFixed(100);
|
||||
nDestVertPan[nLocalPlayer] = IntToFixed(100);
|
||||
}
|
||||
if (localInput.actions & SB_TURNAROUND)
|
||||
{
|
||||
// todo
|
||||
}
|
||||
|
||||
|
||||
sPlayerInput[nLocalPlayer].xVel = lPlayerXVel;
|
||||
sPlayerInput[nLocalPlayer].yVel = lPlayerYVel;
|
||||
// make weapon selection persist until it gets used up.
|
||||
|
@ -446,6 +433,11 @@ void GameInterface::Ticker()
|
|||
sPlayerInput[nLocalPlayer].actions = localInput.actions;
|
||||
if (oldactions & SB_CENTERVIEW) sPlayerInput[nLocalPlayer].actions |= SB_CENTERVIEW;
|
||||
|
||||
if (cl_syncinput)
|
||||
{
|
||||
;// To be completed...
|
||||
}
|
||||
|
||||
Ra[nLocalPlayer].nTarget = besttarget;
|
||||
|
||||
lLocalCodes = 0;
|
||||
|
|
|
@ -193,12 +193,17 @@ static void processMovement(ControlInfo* const hidInput)
|
|||
localInput.q16avel += tempinput.q16avel;
|
||||
localInput.q16horz += tempinput.q16horz;
|
||||
|
||||
if (!cl_syncinput && !nFreeze)
|
||||
if (!cl_syncinput)
|
||||
{
|
||||
Player* pPlayer = &PlayerList[nLocalPlayer];
|
||||
|
||||
applylook(&pPlayer->q16angle, &pPlayer->q16look_ang, &pPlayer->q16rotscrnang, &pPlayer->spin, tempinput.q16avel, &sPlayerInput[nLocalPlayer].actions, scaleAdjust, false);
|
||||
sethorizon(&pPlayer->q16horiz, tempinput.q16horz, &sPlayerInput[nLocalPlayer].actions, scaleAdjust);
|
||||
if (!nFreeze)
|
||||
{
|
||||
applylook(&pPlayer->q16angle, &pPlayer->q16look_ang, &pPlayer->q16rotscrnang, &pPlayer->spin, tempinput.q16avel, &sPlayerInput[nLocalPlayer].actions, scaleAdjust, false);
|
||||
sethorizon(&pPlayer->q16horiz, tempinput.q16horz, &sPlayerInput[nLocalPlayer].actions, scaleAdjust);
|
||||
}
|
||||
|
||||
playerProcessHelpers(&pPlayer->q16angle, &pPlayer->angAdjust, &pPlayer->angTarget, &pPlayer->q16horiz, &pPlayer->horizAdjust, &pPlayer->horizTarget, scaleAdjust);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -438,7 +438,6 @@ void RestartPlayer(short nPlayer)
|
|||
nXDamage[nPlayer] = 0;
|
||||
|
||||
PlayerList[nPlayer].q16horiz = IntToFixed(100);
|
||||
nDestVertPan[nPlayer] = IntToFixed(100);
|
||||
nBreathTimer[nPlayer] = 90;
|
||||
|
||||
nTauntTimer[nPlayer] = RandomSize(3) + 3;
|
||||
|
@ -1033,10 +1032,11 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
|||
{
|
||||
if (nTotalPlayers <= 1)
|
||||
{
|
||||
PlayerList[nPlayer].q16angle = IntToFixed(GetAngleToSprite(nPlayerSprite, nSpiritSprite) & kAngleMask);
|
||||
sprite[nPlayerSprite].ang = FixedToInt(PlayerList[nPlayer].q16angle);
|
||||
auto ang = GetAngleToSprite(nPlayerSprite, nSpiritSprite) & kAngleMask;
|
||||
playerSetAngle(&PlayerList[nPlayer].q16angle, &PlayerList[nPlayer].angTarget, ang);
|
||||
sprite[nPlayerSprite].ang = ang;
|
||||
|
||||
PlayerList[nPlayer].q16horiz = IntToFixed(100);
|
||||
playerSetHoriz(&PlayerList[nPlayer].q16horiz, &PlayerList[nPlayer].horizTarget, 100);
|
||||
|
||||
lPlayerXVel = 0;
|
||||
lPlayerYVel = 0;
|
||||
|
@ -1054,15 +1054,15 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
|||
StopLocalSound();
|
||||
InitSpiritHead();
|
||||
|
||||
nDestVertPan[nPlayer] = IntToFixed(100);
|
||||
playerSetHoriz(&PlayerList[nPlayer].q16horiz, &PlayerList[nPlayer].horizTarget, 100);
|
||||
|
||||
if (currentLevel->levelNumber == 11)
|
||||
{
|
||||
nDestVertPan[nPlayer] += IntToFixed(46);
|
||||
playerAddHoriz(&PlayerList[nPlayer].q16horiz, &PlayerList[nPlayer].horizAdjust, 46);
|
||||
}
|
||||
else
|
||||
{
|
||||
nDestVertPan[nPlayer] += IntToFixed(11);
|
||||
playerAddHoriz(&PlayerList[nPlayer].q16horiz, &PlayerList[nPlayer].horizAdjust, 11);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1091,7 +1091,7 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
|||
}
|
||||
|
||||
if (zVelB > 512 && !bLockPan) {
|
||||
nDestVertPan[nPlayer] = IntToFixed(100);
|
||||
playerSetHoriz(&PlayerList[nPlayer].q16horiz, &PlayerList[nPlayer].horizTarget, 100);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1190,19 +1190,9 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
|||
}
|
||||
|
||||
loc_1AB8E:
|
||||
if (!bPlayerPan && !bLockPan)
|
||||
if (cl_syncinput)
|
||||
{
|
||||
fixed_t nPanVal = IntToFixed(spr_z - sprite[nPlayerSprite].z) / 32 + IntToFixed(100);
|
||||
|
||||
if (nPanVal < 0) {
|
||||
nPanVal = 0;
|
||||
}
|
||||
else if (nPanVal > IntToFixed(183))
|
||||
{
|
||||
nPanVal = IntToFixed(183);
|
||||
}
|
||||
|
||||
nDestVertPan[nPlayer] = nPanVal;
|
||||
;// To be completed.
|
||||
}
|
||||
|
||||
playerX -= sprite[nPlayerSprite].x;
|
||||
|
@ -2793,15 +2783,16 @@ loc_1BD2E:
|
|||
{
|
||||
if (PlayerList[nPlayer].q16horiz < IntToFixed(100))
|
||||
{
|
||||
PlayerList[nPlayer].q16horiz = IntToFixed(91);
|
||||
playerSetHoriz(&PlayerList[nPlayer].q16horiz, &PlayerList[nPlayer].horizTarget, 100);
|
||||
eyelevel[nPlayer] -= (dVertPan[nPlayer] << 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerList[nPlayer].q16horiz += IntToFixed(dVertPan[nPlayer]);
|
||||
if (PlayerList[nPlayer].q16horiz >= IntToFixed(200))
|
||||
playerAddHoriz(&PlayerList[nPlayer].q16horiz, &PlayerList[nPlayer].horizAdjust, dVertPan[nPlayer]);
|
||||
|
||||
if (PlayerList[nPlayer].q16horiz > gi->playerHorizMax())
|
||||
{
|
||||
PlayerList[nPlayer].q16horiz = IntToFixed(199);
|
||||
playerSetHoriz(&PlayerList[nPlayer].q16horiz, &PlayerList[nPlayer].horizTarget, gi->playerHorizMax());
|
||||
}
|
||||
else if (PlayerList[nPlayer].q16horiz <= IntToFixed(100))
|
||||
{
|
||||
|
|
|
@ -75,6 +75,8 @@ struct Player
|
|||
fixed_t oq16look_ang, q16look_ang;
|
||||
fixed_t oq16rotscrnang, q16rotscrnang;
|
||||
fixed_t spin;
|
||||
fixed_t angTarget, horizTarget;
|
||||
double angAdjust, horizAdjust;
|
||||
vec3_t opos;
|
||||
};
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ void DoSpiritHead()
|
|||
{
|
||||
static short dimSectCount = 0;
|
||||
|
||||
PlayerList[0].q16horiz += (nDestVertPan[0] - PlayerList[0].q16horiz) / 4;
|
||||
PlayerList[0].q16horiz += PlayerList[0].q16horiz / 4;
|
||||
TileFiles.InvalidateTile(kTileRamsesWorkTile);
|
||||
int totalclock = leveltime * 4;
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ short bSubTitles = true;
|
|||
|
||||
int zbob;
|
||||
|
||||
fixed_t nDestVertPan[kMaxPlayers] = { 0 };
|
||||
short dVertPan[kMaxPlayers];
|
||||
int nCamerax;
|
||||
int nCameray;
|
||||
|
@ -497,7 +496,6 @@ static SavegameHelper sgh("view",
|
|||
SV(viewz),
|
||||
SV(enemy),
|
||||
SV(nEnemyPal),
|
||||
SA(nDestVertPan),
|
||||
SA(dVertPan),
|
||||
SA(nQuake),
|
||||
SV(g_interpolationCnt),
|
||||
|
|
|
@ -39,7 +39,6 @@ void viewDoInterpolations(int smoothRatio);
|
|||
void viewUpdateInterpolations(void);
|
||||
void viewRestoreInterpolations(void);
|
||||
|
||||
extern fixed_t nDestVertPan[];
|
||||
extern short dVertPan[];
|
||||
extern short nQuake[];
|
||||
extern int nCamerax;
|
||||
|
|
Loading…
Reference in a new issue