mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
* Make Tokens appear in competition.
* Tweak thrown ring colours. * Make Armageddon shield loop properly. * Tweak drowning numbers to be consistent between third and first person.
This commit is contained in:
parent
de8f1fa407
commit
d9b5155e6e
8 changed files with 172 additions and 80 deletions
|
@ -5015,6 +5015,22 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_ARMF14",
|
||||
"S_ARMF15",
|
||||
"S_ARMF16",
|
||||
"S_ARMF17",
|
||||
"S_ARMF18",
|
||||
"S_ARMF19",
|
||||
"S_ARMF20",
|
||||
"S_ARMF21",
|
||||
"S_ARMF22",
|
||||
"S_ARMF23",
|
||||
"S_ARMF24",
|
||||
"S_ARMF25",
|
||||
"S_ARMF26",
|
||||
"S_ARMF27",
|
||||
"S_ARMF28",
|
||||
"S_ARMF29",
|
||||
"S_ARMF30",
|
||||
"S_ARMF31",
|
||||
"S_ARMF32",
|
||||
|
||||
"S_ARMB1",
|
||||
"S_ARMB2",
|
||||
|
@ -5032,6 +5048,22 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
|||
"S_ARMB14",
|
||||
"S_ARMB15",
|
||||
"S_ARMB16",
|
||||
"S_ARMB17",
|
||||
"S_ARMB18",
|
||||
"S_ARMB19",
|
||||
"S_ARMB20",
|
||||
"S_ARMB21",
|
||||
"S_ARMB22",
|
||||
"S_ARMB23",
|
||||
"S_ARMB24",
|
||||
"S_ARMB25",
|
||||
"S_ARMB26",
|
||||
"S_ARMB27",
|
||||
"S_ARMB28",
|
||||
"S_ARMB29",
|
||||
"S_ARMB30",
|
||||
"S_ARMB31",
|
||||
"S_ARMB32",
|
||||
|
||||
"S_WIND1",
|
||||
"S_WIND2",
|
||||
|
|
|
@ -133,8 +133,8 @@ boolean useNightsSS = false;
|
|||
|
||||
UINT8 skincolor_redteam = SKINCOLOR_RED;
|
||||
UINT8 skincolor_blueteam = SKINCOLOR_BLUE;
|
||||
UINT8 skincolor_redring = SKINCOLOR_RED;
|
||||
UINT8 skincolor_bluering = SKINCOLOR_AZURE;
|
||||
UINT8 skincolor_redring = SKINCOLOR_SALMON;
|
||||
UINT8 skincolor_bluering = SKINCOLOR_CORNFLOWER;
|
||||
|
||||
tic_t countdowntimer = 0;
|
||||
boolean countdowntimeup = false;
|
||||
|
|
96
src/info.c
96
src/info.c
|
@ -2215,39 +2215,71 @@ state_t states[NUMSTATES] =
|
|||
{SPR_ARMA, FF_TRANS40|14, 2, {NULL}, 0, 0, S_ARMA16}, // S_ARMA15
|
||||
{SPR_ARMA, FF_TRANS40|15, 2, {NULL}, 0, 0, S_ARMA1 }, // S_ARMA16
|
||||
|
||||
{SPR_ARMF, FF_FULLBRIGHT , 3, {NULL}, 0, 0, S_ARMF2 }, // S_ARMF1
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 1, 3, {NULL}, 0, 0, S_ARMF3 }, // S_ARMF2
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 2, 3, {NULL}, 0, 0, S_ARMF4 }, // S_ARMF3
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 3, 3, {NULL}, 0, 0, S_ARMF5 }, // S_ARMF4
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 4, 3, {NULL}, 0, 0, S_ARMF6 }, // S_ARMF5
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 5, 3, {NULL}, 0, 0, S_ARMF7 }, // S_ARMF6
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 6, 3, {NULL}, 0, 0, S_ARMF8 }, // S_ARMF7
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 7, 3, {NULL}, 0, 0, S_ARMF9 }, // S_ARMF8
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 8, 3, {NULL}, 0, 0, S_ARMF10}, // S_ARMF9
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 9, 3, {NULL}, 0, 0, S_ARMF11}, // S_ARMF10
|
||||
{SPR_ARMF, FF_FULLBRIGHT|10, 3, {NULL}, 0, 0, S_ARMF12}, // S_ARMF11
|
||||
{SPR_ARMF, FF_FULLBRIGHT|11, 3, {NULL}, 0, 0, S_ARMF13}, // S_ARMF12
|
||||
{SPR_ARMF, FF_FULLBRIGHT|12, 3, {NULL}, 0, 0, S_ARMF14}, // S_ARMF13
|
||||
{SPR_ARMF, FF_FULLBRIGHT|13, 3, {NULL}, 0, 0, S_ARMF15}, // S_ARMF14
|
||||
{SPR_ARMF, FF_FULLBRIGHT|14, 3, {NULL}, 0, 0, S_ARMF16}, // S_ARMF15
|
||||
{SPR_ARMF, FF_FULLBRIGHT|15, 3, {NULL}, 0, 0, S_ARMF1 }, // S_ARMF16
|
||||
{SPR_ARMF, FF_FULLBRIGHT , 2, {NULL}, 0, 0, S_ARMF2 }, // S_ARMF1
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 1, 2, {NULL}, 0, 0, S_ARMF3 }, // S_ARMF2
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 2, 2, {NULL}, 0, 0, S_ARMF4 }, // S_ARMF3
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 3, 2, {NULL}, 0, 0, S_ARMF5 }, // S_ARMF4
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 4, 2, {NULL}, 0, 0, S_ARMF6 }, // S_ARMF5
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 5, 2, {NULL}, 0, 0, S_ARMF7 }, // S_ARMF6
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 6, 2, {NULL}, 0, 0, S_ARMF8 }, // S_ARMF7
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 7, 2, {NULL}, 0, 0, S_ARMF9 }, // S_ARMF8
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 8, 2, {NULL}, 0, 0, S_ARMF10}, // S_ARMF9
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 9, 2, {NULL}, 0, 0, S_ARMF11}, // S_ARMF10
|
||||
{SPR_ARMF, FF_FULLBRIGHT|10, 2, {NULL}, 0, 0, S_ARMF12}, // S_ARMF11
|
||||
{SPR_ARMF, FF_FULLBRIGHT|11, 2, {NULL}, 0, 0, S_ARMF13}, // S_ARMF12
|
||||
{SPR_ARMF, FF_FULLBRIGHT|12, 2, {NULL}, 0, 0, S_ARMF14}, // S_ARMF13
|
||||
{SPR_ARMF, FF_FULLBRIGHT|13, 2, {NULL}, 0, 0, S_ARMF15}, // S_ARMF14
|
||||
{SPR_ARMF, FF_FULLBRIGHT|14, 2, {NULL}, 0, 0, S_ARMF16}, // S_ARMF15
|
||||
{SPR_ARMF, FF_FULLBRIGHT|15, 2, {NULL}, 0, 0, S_ARMF17}, // S_ARMF16
|
||||
{SPR_ARMB, FF_FULLBRIGHT , 2, {NULL}, 0, 0, S_ARMF18}, // S_ARMF17
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 1, 2, {NULL}, 0, 0, S_ARMF19}, // S_ARMF18
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 2, 2, {NULL}, 0, 0, S_ARMF20}, // S_ARMF19
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 3, 2, {NULL}, 0, 0, S_ARMF21}, // S_ARMF20
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 4, 2, {NULL}, 0, 0, S_ARMF22}, // S_ARMF21
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 5, 2, {NULL}, 0, 0, S_ARMF23}, // S_ARMF22
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 6, 2, {NULL}, 0, 0, S_ARMF24}, // S_ARMF23
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 7, 2, {NULL}, 0, 0, S_ARMF25}, // S_ARMF24
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 8, 2, {NULL}, 0, 0, S_ARMF26}, // S_ARMF25
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 9, 2, {NULL}, 0, 0, S_ARMF27}, // S_ARMF26
|
||||
{SPR_ARMB, FF_FULLBRIGHT|10, 2, {NULL}, 0, 0, S_ARMF28}, // S_ARMF27
|
||||
{SPR_ARMB, FF_FULLBRIGHT|11, 2, {NULL}, 0, 0, S_ARMF29}, // S_ARMF28
|
||||
{SPR_ARMB, FF_FULLBRIGHT|12, 2, {NULL}, 0, 0, S_ARMF30}, // S_ARMF29
|
||||
{SPR_ARMB, FF_FULLBRIGHT|13, 2, {NULL}, 0, 0, S_ARMF31}, // S_ARMF30
|
||||
{SPR_ARMB, FF_FULLBRIGHT|14, 2, {NULL}, 0, 0, S_ARMF32}, // S_ARMF31
|
||||
{SPR_ARMB, FF_FULLBRIGHT|15, 2, {NULL}, 0, 0, S_ARMF1 }, // S_ARMF32
|
||||
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 0, 3, {NULL}, 1, 0, S_ARMB2 }, // S_ARMB1
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 1, 3, {NULL}, 1, 0, S_ARMB3 }, // S_ARMB2
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 2, 3, {NULL}, 1, 0, S_ARMB4 }, // S_ARMB3
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 3, 3, {NULL}, 1, 0, S_ARMB5 }, // S_ARMB4
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 4, 3, {NULL}, 1, 0, S_ARMB6 }, // S_ARMB5
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 5, 3, {NULL}, 1, 0, S_ARMB7 }, // S_ARMB6
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 6, 3, {NULL}, 1, 0, S_ARMB8 }, // S_ARMB7
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 7, 3, {NULL}, 1, 0, S_ARMB9 }, // S_ARMB8
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 8, 3, {NULL}, 1, 0, S_ARMB10}, // S_ARMB9
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 9, 3, {NULL}, 1, 0, S_ARMB11}, // S_ARMB10
|
||||
{SPR_ARMB, FF_FULLBRIGHT|10, 3, {NULL}, 1, 0, S_ARMB12}, // S_ARMB11
|
||||
{SPR_ARMB, FF_FULLBRIGHT|11, 3, {NULL}, 1, 0, S_ARMB13}, // S_ARMB12
|
||||
{SPR_ARMB, FF_FULLBRIGHT|12, 3, {NULL}, 1, 0, S_ARMB14}, // S_ARMB13
|
||||
{SPR_ARMB, FF_FULLBRIGHT|13, 3, {NULL}, 1, 0, S_ARMB15}, // S_ARMB14
|
||||
{SPR_ARMB, FF_FULLBRIGHT|14, 3, {NULL}, 1, 0, S_ARMB16}, // S_ARMB15
|
||||
{SPR_ARMB, FF_FULLBRIGHT|15, 3, {NULL}, 1, 0, S_ARMB1 }, // S_ARMB16
|
||||
{SPR_ARMB, FF_FULLBRIGHT , 2, {NULL}, 1, 0, S_ARMB2 }, // S_ARMB1
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 1, 2, {NULL}, 1, 0, S_ARMB3 }, // S_ARMB2
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 2, 2, {NULL}, 1, 0, S_ARMB4 }, // S_ARMB3
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 3, 2, {NULL}, 1, 0, S_ARMB5 }, // S_ARMB4
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 4, 2, {NULL}, 1, 0, S_ARMB6 }, // S_ARMB5
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 5, 2, {NULL}, 1, 0, S_ARMB7 }, // S_ARMB6
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 6, 2, {NULL}, 1, 0, S_ARMB8 }, // S_ARMB7
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 7, 2, {NULL}, 1, 0, S_ARMB9 }, // S_ARMB8
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 8, 2, {NULL}, 1, 0, S_ARMB10}, // S_ARMB9
|
||||
{SPR_ARMB, FF_FULLBRIGHT| 9, 2, {NULL}, 1, 0, S_ARMB11}, // S_ARMB10
|
||||
{SPR_ARMB, FF_FULLBRIGHT|10, 2, {NULL}, 1, 0, S_ARMB12}, // S_ARMB11
|
||||
{SPR_ARMB, FF_FULLBRIGHT|11, 2, {NULL}, 1, 0, S_ARMB13}, // S_ARMB12
|
||||
{SPR_ARMB, FF_FULLBRIGHT|12, 2, {NULL}, 1, 0, S_ARMB14}, // S_ARMB13
|
||||
{SPR_ARMB, FF_FULLBRIGHT|13, 2, {NULL}, 1, 0, S_ARMB15}, // S_ARMB14
|
||||
{SPR_ARMB, FF_FULLBRIGHT|14, 2, {NULL}, 1, 0, S_ARMB16}, // S_ARMB15
|
||||
{SPR_ARMB, FF_FULLBRIGHT|15, 2, {NULL}, 1, 0, S_ARMB17}, // S_ARMB16
|
||||
{SPR_ARMF, FF_FULLBRIGHT , 2, {NULL}, 1, 0, S_ARMB18}, // S_ARMB17
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 1, 2, {NULL}, 1, 0, S_ARMB19}, // S_ARMB18
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 2, 2, {NULL}, 1, 0, S_ARMB20}, // S_ARMB19
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 3, 2, {NULL}, 1, 0, S_ARMB21}, // S_ARMB20
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 4, 2, {NULL}, 1, 0, S_ARMB22}, // S_ARMB21
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 5, 2, {NULL}, 1, 0, S_ARMB23}, // S_ARMB22
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 6, 2, {NULL}, 1, 0, S_ARMB24}, // S_ARMB23
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 7, 2, {NULL}, 1, 0, S_ARMB25}, // S_ARMB24
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 8, 2, {NULL}, 1, 0, S_ARMB26}, // S_ARMB25
|
||||
{SPR_ARMF, FF_FULLBRIGHT| 9, 2, {NULL}, 1, 0, S_ARMB27}, // S_ARMB26
|
||||
{SPR_ARMF, FF_FULLBRIGHT|10, 2, {NULL}, 1, 0, S_ARMB28}, // S_ARMB27
|
||||
{SPR_ARMF, FF_FULLBRIGHT|11, 2, {NULL}, 1, 0, S_ARMB29}, // S_ARMB28
|
||||
{SPR_ARMF, FF_FULLBRIGHT|12, 2, {NULL}, 1, 0, S_ARMB30}, // S_ARMB29
|
||||
{SPR_ARMF, FF_FULLBRIGHT|13, 2, {NULL}, 1, 0, S_ARMB31}, // S_ARMB30
|
||||
{SPR_ARMF, FF_FULLBRIGHT|14, 2, {NULL}, 1, 0, S_ARMB32}, // S_ARMB31
|
||||
{SPR_ARMF, FF_FULLBRIGHT|15, 2, {NULL}, 1, 0, S_ARMB1 }, // S_ARMB32
|
||||
|
||||
{SPR_WIND, FF_TRANS70 , 2, {NULL}, 0, 0, S_WIND2}, // S_WIND1
|
||||
{SPR_WIND, FF_TRANS70|1, 2, {NULL}, 0, 0, S_WIND3}, // S_WIND2
|
||||
|
|
32
src/info.h
32
src/info.h
|
@ -2330,6 +2330,22 @@ typedef enum state
|
|||
S_ARMF14,
|
||||
S_ARMF15,
|
||||
S_ARMF16,
|
||||
S_ARMF17,
|
||||
S_ARMF18,
|
||||
S_ARMF19,
|
||||
S_ARMF20,
|
||||
S_ARMF21,
|
||||
S_ARMF22,
|
||||
S_ARMF23,
|
||||
S_ARMF24,
|
||||
S_ARMF25,
|
||||
S_ARMF26,
|
||||
S_ARMF27,
|
||||
S_ARMF28,
|
||||
S_ARMF29,
|
||||
S_ARMF30,
|
||||
S_ARMF31,
|
||||
S_ARMF32,
|
||||
|
||||
S_ARMB1,
|
||||
S_ARMB2,
|
||||
|
@ -2347,6 +2363,22 @@ typedef enum state
|
|||
S_ARMB14,
|
||||
S_ARMB15,
|
||||
S_ARMB16,
|
||||
S_ARMB17,
|
||||
S_ARMB18,
|
||||
S_ARMB19,
|
||||
S_ARMB20,
|
||||
S_ARMB21,
|
||||
S_ARMB22,
|
||||
S_ARMB23,
|
||||
S_ARMB24,
|
||||
S_ARMB25,
|
||||
S_ARMB26,
|
||||
S_ARMB27,
|
||||
S_ARMB28,
|
||||
S_ARMB29,
|
||||
S_ARMB30,
|
||||
S_ARMB31,
|
||||
S_ARMB32,
|
||||
|
||||
S_WIND1,
|
||||
S_WIND2,
|
||||
|
|
|
@ -577,25 +577,27 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
case MT_TOKEN:
|
||||
if (player->bot)
|
||||
return;
|
||||
tokenlist += special->health;
|
||||
|
||||
P_AddPlayerScore(player, 1000);
|
||||
|
||||
if (!modeattacking) // score only there...
|
||||
if (gametype != GT_COOP || modeattacking) // score only?
|
||||
break;
|
||||
|
||||
tokenlist += special->health;
|
||||
|
||||
if (ALL7EMERALDS(emeralds)) // Got all 7
|
||||
{
|
||||
if (ALL7EMERALDS(emeralds)) // Got all 7
|
||||
if (!(netgame || multiplayer))
|
||||
{
|
||||
if (!(netgame || multiplayer))
|
||||
{
|
||||
player->continues += 1;
|
||||
players->gotcontinue = true;
|
||||
if (P_IsLocalPlayer(player))
|
||||
S_StartSound(NULL, sfx_s3kac);
|
||||
}
|
||||
player->continues += 1;
|
||||
players->gotcontinue = true;
|
||||
if (P_IsLocalPlayer(player))
|
||||
S_StartSound(NULL, sfx_s3kac);
|
||||
}
|
||||
else
|
||||
token++;
|
||||
}
|
||||
else
|
||||
token++;
|
||||
|
||||
break;
|
||||
|
||||
// Emerald Hunt
|
||||
|
|
|
@ -9539,7 +9539,7 @@ void P_SpawnMapThing(mapthing_t *mthing)
|
|||
// They're likely facets of the level's design and therefore required to progress.
|
||||
}
|
||||
|
||||
if (i == MT_TOKEN && (gametype != GT_COOP || ultimatemode || tokenbits == 30 || tokenlist & (1 << tokenbits++)))
|
||||
if (i == MT_TOKEN && ((gametype != GT_COOP && gametype != GT_COMPETITION) || ultimatemode || tokenbits == 30 || tokenlist & (1 << tokenbits++)))
|
||||
return; // you already got this token, or there are too many, or the gametype's not right
|
||||
|
||||
// Objectplace landing point
|
||||
|
|
27
src/p_user.c
27
src/p_user.c
|
@ -2336,12 +2336,17 @@ static void P_CheckUnderwaterAndSpaceTimer(player_t *player)
|
|||
{
|
||||
tic_t timeleft = (player->powers[pw_spacetime]) ? player->powers[pw_spacetime] : player->powers[pw_underwater];
|
||||
|
||||
if ((timeleft == 11*TICRATE + 1) // 5
|
||||
|| (timeleft == 9*TICRATE + 1) // 4
|
||||
|| (timeleft == 7*TICRATE + 1) // 3
|
||||
|| (timeleft == 5*TICRATE + 1) // 2
|
||||
|| (timeleft == 3*TICRATE + 1) // 1
|
||||
|| (timeleft == 1*TICRATE + 1) // 0
|
||||
if (player->exiting)
|
||||
player->powers[pw_underwater] = player->powers[pw_spacetime] = 0;
|
||||
|
||||
timeleft--; // The original code was all n*TICRATE + 1, so let's remove 1 tic for simplicity
|
||||
|
||||
if ((timeleft == 11*TICRATE) // 5
|
||||
|| (timeleft == 9*TICRATE) // 4
|
||||
|| (timeleft == 7*TICRATE) // 3
|
||||
|| (timeleft == 5*TICRATE) // 2
|
||||
|| (timeleft == 3*TICRATE) // 1
|
||||
|| (timeleft == 1*TICRATE) // 0
|
||||
) {
|
||||
fixed_t height = (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
? player->mo->z - FixedMul(8*FRACUNIT + mobjinfo[MT_DROWNNUMBERS].height, FixedMul(player->mo->scale, player->shieldscale))
|
||||
|
@ -2349,7 +2354,7 @@ static void P_CheckUnderwaterAndSpaceTimer(player_t *player)
|
|||
|
||||
mobj_t *numbermobj = P_SpawnMobj(player->mo->x, player->mo->y, height, MT_DROWNNUMBERS);
|
||||
|
||||
timeleft /= (2*TICRATE); // To be strictly accurate it'd need to be (((timeleft - 1)/TICRATE) - 1)/2, but integer division rounds down for us
|
||||
timeleft /= (2*TICRATE); // To be strictly accurate it'd need to be ((timeleft/TICRATE) - 1)/2, but integer division rounds down for us
|
||||
|
||||
if (player->charflags & SF_MACHINE)
|
||||
{
|
||||
|
@ -2408,14 +2413,6 @@ static void P_CheckUnderwaterAndSpaceTimer(player_t *player)
|
|||
S_ChangeMusicInternal("_drown", false);
|
||||
}
|
||||
}
|
||||
|
||||
if (player->exiting)
|
||||
{
|
||||
if (player->powers[pw_underwater] > 1)
|
||||
player->powers[pw_underwater] = 0;
|
||||
|
||||
player->powers[pw_spacetime] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1251,7 +1251,6 @@ static void ST_drawFirstPersonHUD(void)
|
|||
{
|
||||
patch_t *p = NULL;
|
||||
UINT32 airtime;
|
||||
UINT32 frame = 0;
|
||||
spriteframe_t *sprframe;
|
||||
// If both air timers are active, use the air timer with the least time left
|
||||
if (stplyr->powers[pw_underwater] && stplyr->powers[pw_spacetime])
|
||||
|
@ -1259,34 +1258,32 @@ static void ST_drawFirstPersonHUD(void)
|
|||
else // Use whichever one is active otherwise
|
||||
airtime = (stplyr->powers[pw_spacetime]) ? stplyr->powers[pw_spacetime] : stplyr->powers[pw_underwater];
|
||||
|
||||
if (!airtime)
|
||||
if (airtime < 1)
|
||||
return; // No air timers are active, nothing would be drawn anyway
|
||||
|
||||
airtime--; // The original code was all n*TICRATE + 1, so let's remove 1 tic for simplicity
|
||||
|
||||
if (airtime > 11*TICRATE)
|
||||
return; // Not time to draw any drown numbers yet
|
||||
// Choose which frame to use based on time left
|
||||
if (airtime <= 11*TICRATE && airtime >= 10*TICRATE)
|
||||
frame = 5;
|
||||
else if (airtime <= 9*TICRATE && airtime >= 8*TICRATE)
|
||||
frame = 4;
|
||||
else if (airtime <= 7*TICRATE && airtime >= 6*TICRATE)
|
||||
frame = 3;
|
||||
else if (airtime <= 5*TICRATE && airtime >= 4*TICRATE)
|
||||
frame = 2;
|
||||
else if (airtime <= 3*TICRATE && airtime >= 2*TICRATE)
|
||||
frame = 1;
|
||||
else if (airtime <= 1*TICRATE && airtime > 0)
|
||||
frame = 0;
|
||||
else
|
||||
|
||||
if (!((airtime > 10*TICRATE - 5)
|
||||
|| (airtime <= 9*TICRATE && airtime > 8*TICRATE - 5)
|
||||
|| (airtime <= 7*TICRATE && airtime > 6*TICRATE - 5)
|
||||
|| (airtime <= 5*TICRATE && airtime > 4*TICRATE - 5)
|
||||
|| (airtime <= 3*TICRATE && airtime > 2*TICRATE - 5)
|
||||
|| (airtime <= 1*TICRATE)))
|
||||
return; // Don't draw anything between numbers
|
||||
|
||||
if (!((airtime % 10) < 5))
|
||||
return; // Keep in line with the flashing thing from third person.
|
||||
|
||||
airtime /= (2*TICRATE); // To be strictly accurate it'd need to be ((airtime/TICRATE) - 1)/2, but integer division rounds down for us
|
||||
|
||||
if (stplyr->charflags & SF_MACHINE)
|
||||
frame += 6; // Robots use different drown numbers
|
||||
airtime += 6; // Robots use different drown numbers
|
||||
|
||||
// Get the front angle patch for the frame
|
||||
sprframe = &sprites[SPR_DRWN].spriteframes[frame];
|
||||
sprframe = &sprites[SPR_DRWN].spriteframes[airtime];
|
||||
p = W_CachePatchNum(sprframe->lumppat[0], PU_CACHE);
|
||||
|
||||
// Display the countdown drown numbers!
|
||||
|
|
Loading…
Reference in a new issue