mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Exhumed: Move dVertPan[]
array into Player
struct.
This commit is contained in:
parent
095b33fa67
commit
05fd2911a4
4 changed files with 7 additions and 9 deletions
|
@ -404,7 +404,7 @@ void RestartPlayer(int nPlayer)
|
|||
|
||||
plr->pPlayerGrenade = nullptr;
|
||||
pActor->oviewzoffset = pActor->viewzoffset = -55.;
|
||||
dVertPan[nPlayer] = 0;
|
||||
plr->dVertPan = 0;
|
||||
|
||||
nTemperature[nPlayer] = 0;
|
||||
|
||||
|
@ -508,7 +508,7 @@ void StartDeathSeq(int nPlayer, int nVal)
|
|||
PlayerList[nPlayer].pActor->PrevAngles.Pitch = PlayerList[nPlayer].pActor->spr.Angles.Pitch = nullAngle;
|
||||
pActor->oviewzoffset = pActor->viewzoffset = -55;
|
||||
PlayerList[nPlayer].nInvisible = 0;
|
||||
dVertPan[nPlayer] = 15;
|
||||
PlayerList[nPlayer].dVertPan = 15;
|
||||
|
||||
pActor->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
|
||||
|
@ -2593,18 +2593,18 @@ sectdone:
|
|||
if (pPlayerActor->viewzoffset >= -11)
|
||||
{
|
||||
pPlayerActor->viewzoffset = -11;
|
||||
dVertPan[nPlayer] = 0;
|
||||
PlayerList[nPlayer].dVertPan = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PlayerList[nPlayer].pActor->spr.Angles.Pitch.Sgn() > 0)
|
||||
{
|
||||
pPlayerActor->spr.Angles.Pitch = nullAngle;
|
||||
pPlayerActor->viewzoffset -= dVertPan[nPlayer];
|
||||
pPlayerActor->viewzoffset -= PlayerList[nPlayer].dVertPan;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerList[nPlayer].pActor->spr.Angles.Pitch -= maphoriz(dVertPan[nPlayer]);
|
||||
PlayerList[nPlayer].pActor->spr.Angles.Pitch -= maphoriz(PlayerList[nPlayer].dVertPan);
|
||||
|
||||
if (PlayerList[nPlayer].pActor->spr.Angles.Pitch.Degrees() <= -38)
|
||||
{
|
||||
|
@ -2618,7 +2618,7 @@ sectdone:
|
|||
}
|
||||
}
|
||||
|
||||
dVertPan[nPlayer]--;
|
||||
PlayerList[nPlayer].dVertPan--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,6 +98,7 @@ struct Player
|
|||
int16_t nPlayerPushSound;
|
||||
int16_t nTauntTimer;
|
||||
uint16_t nPlayerWeapons; // each set bit represents a weapon the player has
|
||||
int16_t dVertPan;
|
||||
PlayerSave sPlayerSave;
|
||||
int ototalvel;
|
||||
int totalvel;
|
||||
|
|
|
@ -36,7 +36,6 @@ BEGIN_PS_NS
|
|||
|
||||
bool bSubTitles = true;
|
||||
|
||||
int16_t dVertPan[kMaxPlayers];
|
||||
DVector3 nCamerapos;
|
||||
bool bTouchFloor;
|
||||
|
||||
|
@ -346,7 +345,6 @@ void SerializeView(FSerializer& arc)
|
|||
("touchfloor", bTouchFloor)
|
||||
("chunktotal", nChunkTotal)
|
||||
("camera", bCamera)
|
||||
.Array("vertpan", dVertPan, countof(dVertPan))
|
||||
.Array("quake", nQuake, countof(nQuake))
|
||||
.EndObject();
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ void DrawStatusBar();
|
|||
void DrawView(double interpfrac, bool sceneonly = false);
|
||||
void ResetView();
|
||||
|
||||
extern int16_t dVertPan[];
|
||||
extern double nQuake[];
|
||||
extern DVector3 nCamerapos;
|
||||
extern bool bTouchFloor;
|
||||
|
|
Loading…
Reference in a new issue