mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 10:53:27 +00:00
HUD visual indicator + property fix
This commit is contained in:
parent
9e4c519cad
commit
db22d503a4
2 changed files with 24 additions and 2 deletions
|
@ -18022,7 +18022,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
16, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
MF_NOBLOCKMAP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
|
|
@ -128,6 +128,7 @@ static patch_t *minus5sec;
|
|||
static patch_t *minicaps;
|
||||
static patch_t *gotrflag;
|
||||
static patch_t *gotbflag;
|
||||
static patch_t *fnshico;
|
||||
|
||||
static boolean facefreed[MAXPLAYERS];
|
||||
|
||||
|
@ -310,6 +311,7 @@ void ST_LoadGraphics(void)
|
|||
bmatcico = W_CachePatchName("BMATCICO", PU_HUDGFX);
|
||||
gotrflag = W_CachePatchName("GOTRFLAG", PU_HUDGFX);
|
||||
gotbflag = W_CachePatchName("GOTBFLAG", PU_HUDGFX);
|
||||
fnshico = W_CachePatchName("FNSHICO", PU_HUDGFX);
|
||||
nonicon = W_CachePatchName("NONICON", PU_HUDGFX);
|
||||
nonicon2 = W_CachePatchName("NONICON2", PU_HUDGFX);
|
||||
|
||||
|
@ -1432,7 +1434,7 @@ static void ST_drawPowerupHUD(void)
|
|||
UINT16 invulntime = 0;
|
||||
INT32 offs = hudinfo[HUD_POWERUPS].x;
|
||||
const UINT8 q = ((splitscreen && stplyr == &players[secondarydisplayplayer]) ? 1 : 0);
|
||||
static INT32 flagoffs[2] = {0, 0}, shieldoffs[2] = {0, 0};
|
||||
static INT32 flagoffs[2] = {0, 0}, shieldoffs[2] = {0, 0}, finishoffs[2] = {0, 0};
|
||||
#define ICONSEP (16+4) // matches weapon rings HUD
|
||||
|
||||
if (F_GetPromptHideHud(hudinfo[HUD_POWERUPS].y))
|
||||
|
@ -1440,6 +1442,26 @@ static void ST_drawPowerupHUD(void)
|
|||
|
||||
if (stplyr->spectator || stplyr->playerstate != PST_LIVE)
|
||||
return;
|
||||
|
||||
// ---------
|
||||
// Finish icon
|
||||
// ---------
|
||||
|
||||
// Let's have a power-like icon to represent finishing the level!
|
||||
if (stplyr->pflags & PF_FINISHED && cv_exitmove.value)
|
||||
{
|
||||
finishoffs[q] = ICONSEP;
|
||||
V_DrawSmallScaledPatch(offs, hudinfo[HUD_POWERUPS].y, V_PERPLAYER|hudinfo[HUD_POWERUPS].f|V_HUDTRANS, fnshico);
|
||||
}
|
||||
else if (finishoffs[q])
|
||||
{
|
||||
if (finishoffs[q] > 1)
|
||||
finishoffs[q] = 2*finishoffs[q]/3;
|
||||
else
|
||||
finishoffs[q] = 0;
|
||||
}
|
||||
|
||||
offs -= finishoffs[q];
|
||||
|
||||
// -------
|
||||
// Shields
|
||||
|
|
Loading…
Reference in a new issue