mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Reduce invinc rainbow, grow/shrink, ring boost flashing
This commit is contained in:
parent
2270813eee
commit
7e0fa35b7f
3 changed files with 31 additions and 7 deletions
|
|
@ -6865,7 +6865,13 @@ static void K_drawKartStartCountdown(void)
|
|||
}
|
||||
}
|
||||
|
||||
if ((leveltime % (2*5)) / 5) // blink
|
||||
int flashrate = 5;
|
||||
if (cv_reducevfx.value)
|
||||
{
|
||||
flashrate = 35;
|
||||
}
|
||||
|
||||
if ((leveltime % (2*flashrate)) / flashrate) // blink
|
||||
pnum += 5;
|
||||
if (r_splitscreen) // splitscreen
|
||||
pnum += 10;
|
||||
|
|
|
|||
22
src/k_kart.c
22
src/k_kart.c
|
|
@ -11789,15 +11789,21 @@ void K_KartResetPlayerColor(player_t *player)
|
|||
|
||||
fullbright = true;
|
||||
|
||||
int invinc_rotation_delay = 2;
|
||||
if (cv_reducevfx.value)
|
||||
{
|
||||
invinc_rotation_delay = 8;
|
||||
}
|
||||
|
||||
if (player->invincibilitytimer > defaultTime)
|
||||
{
|
||||
player->mo->color = K_RainbowColor(leveltime / 2);
|
||||
player->mo->color = K_RainbowColor(leveltime / invinc_rotation_delay);
|
||||
player->mo->colorized = true;
|
||||
skip = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
flicker += (defaultTime - player->invincibilitytimer) / TICRATE / 2;
|
||||
flicker += ((defaultTime - player->invincibilitytimer) / TICRATE / 2) * cv_reducevfx.value ? 4 : 1;
|
||||
}
|
||||
|
||||
if (leveltime % flicker == 0)
|
||||
|
|
@ -11815,7 +11821,8 @@ void K_KartResetPlayerColor(player_t *player)
|
|||
|
||||
if (player->growshrinktimer) // Ditto, for grow/shrink
|
||||
{
|
||||
if (player->growshrinktimer % 5 == 0)
|
||||
|
||||
if ((!cv_reducevfx.value && player->growshrinktimer % 5 == 0) || (cv_reducevfx.value && player->growshrinktimer % 35 < 12))
|
||||
{
|
||||
player->mo->colorized = true;
|
||||
player->mo->color = (player->growshrinktimer < 0 ? SKINCOLOR_CREAMSICLE : SKINCOLOR_PERIWINKLE);
|
||||
|
|
@ -11846,13 +11853,18 @@ void K_KartResetPlayerColor(player_t *player)
|
|||
}
|
||||
|
||||
boolean allowflashing = true;
|
||||
int flashingrate = 1;
|
||||
if (demo.playback && cv_reducevfx.value && !R_CanShowSkinInDemo(player->skin))
|
||||
{
|
||||
// messy condition stack for, specifically, disabling flashing effects when viewing a staff ghost replay of a currently hidden character
|
||||
allowflashing = false;
|
||||
}
|
||||
if (cv_reducevfx.value)
|
||||
{
|
||||
flashingrate = 4;
|
||||
}
|
||||
|
||||
if (player->overdrive && (leveltime & 1) && allowflashing)
|
||||
if (player->overdrive && ((leveltime / flashingrate) & 1) && allowflashing)
|
||||
{
|
||||
player->mo->colorized = true;
|
||||
fullbright = true;
|
||||
|
|
@ -11867,7 +11879,7 @@ void K_KartResetPlayerColor(player_t *player)
|
|||
goto finalise;
|
||||
}
|
||||
|
||||
if (player->ringboost && (leveltime & 1) && allowflashing) // ring boosting
|
||||
if (player->ringboost && ((leveltime / flashingrate) & 1) && allowflashing) // ring boosting
|
||||
{
|
||||
player->mo->colorized = true;
|
||||
fullbright = true;
|
||||
|
|
|
|||
|
|
@ -8202,6 +8202,12 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
|
||||
trans = NUMTRANSMAPS - trans;
|
||||
|
||||
int invinc_rotation_delay = 2;
|
||||
if (cv_reducevfx.value)
|
||||
{
|
||||
invinc_rotation_delay = 8;
|
||||
}
|
||||
|
||||
if ((trans >= NUMTRANSMAPS) // not a valid visibility
|
||||
|| (myspeed < (tripspeed - basespeed/2) && (leveltime & 1)) // < 150% flickering
|
||||
|| (mobj->target->player->tripwirePass < TRIPWIRE_BOOST) // Not strong enough to make an aura
|
||||
|
|
@ -8224,7 +8230,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
{
|
||||
if (mobj->target->player->invincibilitytimer > itemtime+(2*TICRATE))
|
||||
{
|
||||
mobj->color = K_RainbowColor(leveltime / 2);
|
||||
mobj->color = K_RainbowColor(leveltime / invinc_rotation_delay);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue