mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Fix air meter in status bar
This commit is contained in:
parent
308885d92c
commit
4dcde5dde7
2 changed files with 13 additions and 17 deletions
|
@ -609,6 +609,7 @@ void RestartPlayer(short nPlayer)
|
|||
|
||||
PlayerList[nPlayer].field_3C = 0;
|
||||
PlayerList[nPlayer].nAir = 100;
|
||||
airpages = 0;
|
||||
|
||||
if (levelnum <= kMap20)
|
||||
{
|
||||
|
@ -1503,19 +1504,16 @@ loc_1AB8E:
|
|||
// if underwater
|
||||
if (var_5C)
|
||||
{
|
||||
airpages = 1;
|
||||
if (PlayerList[nPlayer].nMaskAmount > 0)
|
||||
{
|
||||
if (nPlayer == nLocalPlayer) {
|
||||
BuildStatusAnim(132, 0);
|
||||
}
|
||||
|
||||
airpages = 0;
|
||||
D3PlayFX(StaticSound[kSound30], nPlayerSprite);
|
||||
|
||||
PlayerList[nPlayer].nAir = 100;
|
||||
|
||||
DoBubbles(nPlayer);
|
||||
SetAirFrame();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1523,9 +1521,6 @@ loc_1AB8E:
|
|||
if (PlayerList[nPlayer].nAir > 0)
|
||||
{
|
||||
D3PlayFX(StaticSound[kSound25], nPlayerSprite);
|
||||
|
||||
DoBubbles(nPlayer);
|
||||
SetAirFrame();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1553,6 +1548,9 @@ loc_1AB8E:
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
DoBubbles(nPlayer);
|
||||
SetAirFrame();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1598,6 +1596,8 @@ loc_1AB8E:
|
|||
nBreathTimer[nPlayer] = 1;
|
||||
}
|
||||
|
||||
airpages = 0;
|
||||
|
||||
nBreathTimer[nPlayer]--;
|
||||
if (nBreathTimer[nPlayer] <= 0)
|
||||
{
|
||||
|
|
|
@ -303,18 +303,14 @@ void SetAirFrame()
|
|||
{
|
||||
airframe = PlayerList[nLocalPlayer].nAir / airperline;
|
||||
|
||||
if (airframe < nAirFrames)
|
||||
{
|
||||
if (airframe < 0) {
|
||||
airframe = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (airframe >= nAirFrames)
|
||||
{
|
||||
airframe = nAirFrames - 1;
|
||||
}
|
||||
|
||||
airpages = numpages;
|
||||
else if (airframe < 0)
|
||||
{
|
||||
airframe = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void SetCounter(short nVal)
|
||||
|
@ -695,7 +691,7 @@ void DrawStatus()
|
|||
if (airpages)
|
||||
{
|
||||
seq_DrawStatusSequence(nStatusSeqOffset + 133, airframe, 0);
|
||||
airpages--;
|
||||
// airpages--;
|
||||
}
|
||||
|
||||
// draw compass
|
||||
|
|
Loading…
Reference in a new issue