mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 05:30:48 +00:00
Standardize NiGHTS link timer w/ NightsLinkTics MAINCFG option
This commit is contained in:
parent
b28183129f
commit
09f4309f45
5 changed files with 13 additions and 8 deletions
|
@ -2730,11 +2730,14 @@ static void readmaincfg(MYFILE *f)
|
|||
{
|
||||
extralifetics = (UINT16)get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "NIGHTSLINKTICS"))
|
||||
{
|
||||
nightslinktics = (UINT16)get_number(word2);
|
||||
}
|
||||
else if (fastcmp(word, "GAMEOVERTICS"))
|
||||
{
|
||||
gameovertics = get_number(word2);
|
||||
}
|
||||
|
||||
else if (fastcmp(word, "INTROTOPLAY"))
|
||||
{
|
||||
introtoplay = (UINT8)get_number(word2);
|
||||
|
|
|
@ -413,6 +413,7 @@ extern UINT16 tailsflytics;
|
|||
extern UINT16 underwatertics;
|
||||
extern UINT16 spacetimetics;
|
||||
extern UINT16 extralifetics;
|
||||
extern UINT16 nightslinktics;
|
||||
|
||||
extern UINT8 introtoplay;
|
||||
extern UINT8 creditscutscene;
|
||||
|
|
|
@ -201,6 +201,7 @@ UINT16 tailsflytics = 8*TICRATE;
|
|||
UINT16 underwatertics = 30*TICRATE;
|
||||
UINT16 spacetimetics = 11*TICRATE + (TICRATE/2);
|
||||
UINT16 extralifetics = 4*TICRATE;
|
||||
UINT16 nightslinktics = 2*TICRATE;
|
||||
|
||||
INT32 gameovertics = 15*TICRATE;
|
||||
|
||||
|
|
|
@ -182,14 +182,14 @@ void P_DoNightsScore(player_t *player)
|
|||
{
|
||||
if (++players[i].linkcount > players[i].maxlink)
|
||||
players[i].maxlink = players[i].linkcount;
|
||||
players[i].linktimer = 2*TICRATE;
|
||||
players[i].linktimer = nightslinktics;
|
||||
}
|
||||
}
|
||||
else // Individual link counts
|
||||
{
|
||||
if (++player->linkcount > player->maxlink)
|
||||
player->maxlink = player->linkcount;
|
||||
player->linktimer = 2*TICRATE;
|
||||
player->linktimer = nightslinktics;
|
||||
}
|
||||
|
||||
if (player->linkcount < 10)
|
||||
|
@ -1162,7 +1162,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
if (!G_IsSpecialStage(gamemap))
|
||||
{
|
||||
player->powers[pw_nights_linkfreeze] = (UINT16)special->info->speed;
|
||||
player->linktimer = 2*TICRATE;
|
||||
player->linktimer = nightslinktics;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1170,7 +1170,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
if (playeringame[i] && players[i].powers[pw_carry] == CR_NIGHTSMODE)
|
||||
{
|
||||
players[i].powers[pw_nights_linkfreeze] += (UINT16)special->info->speed;
|
||||
players[i].linktimer = 2*TICRATE;
|
||||
players[i].linktimer = nightslinktics;
|
||||
}
|
||||
if (special->info->deathsound != sfx_None)
|
||||
S_StartSound(NULL, special->info->deathsound);
|
||||
|
@ -2185,7 +2185,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
// to make people want to actually dash towards/paraloop enemies
|
||||
if (++source->player->linkcount > source->player->maxlink)
|
||||
source->player->maxlink = source->player->linkcount;
|
||||
source->player->linktimer = 2*TICRATE;
|
||||
source->player->linktimer = nightslinktics;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1535,8 +1535,8 @@ static void ST_drawNiGHTSHUD(void)
|
|||
else
|
||||
colornum = linkColor[mag][sel];
|
||||
|
||||
aflag |= ((stplyr->linktimer < 2*TICRATE/3)
|
||||
? (9 - 9*stplyr->linktimer/(2*TICRATE/3)) << V_ALPHASHIFT
|
||||
aflag |= ((stplyr->linktimer < nightslinktics/3)
|
||||
? (9 - 9*stplyr->linktimer/(nightslinktics/3)) << V_ALPHASHIFT
|
||||
: 0);
|
||||
|
||||
y = (160+11)<<FRACBITS;
|
||||
|
|
Loading…
Reference in a new issue