mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'invinc-color-fix' into 'master'
Invinc color fix See merge request KartKrew/Kart!553
This commit is contained in:
commit
82377fb001
5 changed files with 10 additions and 5 deletions
|
|
@ -244,7 +244,10 @@ typedef enum
|
||||||
SKINCOLOR_PEACH,
|
SKINCOLOR_PEACH,
|
||||||
SKINCOLOR_BROWN,
|
SKINCOLOR_BROWN,
|
||||||
SKINCOLOR_LEATHER,
|
SKINCOLOR_LEATHER,
|
||||||
SKINCOLOR_PINK,
|
|
||||||
|
FIRSTRAINBOWCOLOR,
|
||||||
|
|
||||||
|
SKINCOLOR_PINK = FIRSTRAINBOWCOLOR,
|
||||||
SKINCOLOR_ROSE,
|
SKINCOLOR_ROSE,
|
||||||
SKINCOLOR_CINNAMON,
|
SKINCOLOR_CINNAMON,
|
||||||
SKINCOLOR_RUBY,
|
SKINCOLOR_RUBY,
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@
|
||||||
#include "k_battle.h"
|
#include "k_battle.h"
|
||||||
#include "k_respawn.h"
|
#include "k_respawn.h"
|
||||||
#include "k_bot.h"
|
#include "k_bot.h"
|
||||||
|
#include "k_color.h"
|
||||||
|
|
||||||
static CV_PossibleValue_t recordmultiplayerdemos_cons_t[] = {{0, "Disabled"}, {1, "Manual Save"}, {2, "Auto Save"}, {0, NULL}};
|
static CV_PossibleValue_t recordmultiplayerdemos_cons_t[] = {{0, "Disabled"}, {1, "Manual Save"}, {2, "Auto Save"}, {0, NULL}};
|
||||||
consvar_t cv_recordmultiplayerdemos = CVAR_INIT ("netdemo_record", "Manual Save", CV_SAVE, recordmultiplayerdemos_cons_t, NULL);
|
consvar_t cv_recordmultiplayerdemos = CVAR_INIT ("netdemo_record", "Manual Save", CV_SAVE, recordmultiplayerdemos_cons_t, NULL);
|
||||||
|
|
@ -1330,7 +1331,7 @@ skippedghosttic:
|
||||||
g->mo->color += abs( ( (signed)( (unsigned)leveltime >> 1 ) % 9) - 4);
|
g->mo->color += abs( ( (signed)( (unsigned)leveltime >> 1 ) % 9) - 4);
|
||||||
break;
|
break;
|
||||||
case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer)
|
case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer)
|
||||||
g->mo->color = (UINT16)(SKINCOLOR_RUBY + (leveltime % (FIRSTSUPERCOLOR - SKINCOLOR_RUBY))); // Passes through all saturated colours
|
g->mo->color = K_RainbowColor(leveltime); // Passes through all saturated colours
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ UINT8 K_ColorRelativeLuminance(UINT8 r, UINT8 g, UINT8 b)
|
||||||
|
|
||||||
UINT16 K_RainbowColor(tic_t time)
|
UINT16 K_RainbowColor(tic_t time)
|
||||||
{
|
{
|
||||||
return (UINT16)(SKINCOLOR_PINK + (time % (SKINCOLOR_TAFFY - SKINCOLOR_PINK)));
|
return (UINT16)(FIRSTRAINBOWCOLOR + (time % (FIRSTSUPERCOLOR - FIRSTRAINBOWCOLOR)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------
|
/*--------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -9789,7 +9789,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||||
break;
|
break;
|
||||||
case MT_EGGROBO1:
|
case MT_EGGROBO1:
|
||||||
mobj->movecount = P_RandomKey(13);
|
mobj->movecount = P_RandomKey(13);
|
||||||
mobj->color = SKINCOLOR_RUBY + P_RandomKey(numskincolors - SKINCOLOR_RUBY);
|
mobj->color = FIRSTRAINBOWCOLOR + P_RandomKey(FIRSTSUPERCOLOR - FIRSTRAINBOWCOLOR);
|
||||||
break;
|
break;
|
||||||
case MT_HIVEELEMENTAL:
|
case MT_HIVEELEMENTAL:
|
||||||
mobj->extravalue1 = 5;
|
mobj->extravalue1 = 5;
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@
|
||||||
#include "k_bot.h"
|
#include "k_bot.h"
|
||||||
#include "k_grandprix.h"
|
#include "k_grandprix.h"
|
||||||
#include "k_terrain.h" // K_SpawnSplashForMobj
|
#include "k_terrain.h" // K_SpawnSplashForMobj
|
||||||
|
#include "k_color.h"
|
||||||
|
|
||||||
#ifdef HW3SOUND
|
#ifdef HW3SOUND
|
||||||
#include "hardware/hw3sound.h"
|
#include "hardware/hw3sound.h"
|
||||||
|
|
@ -1629,7 +1630,7 @@ static void P_CheckInvincibilityTimer(player_t *player)
|
||||||
if (!player->invincibilitytimer)
|
if (!player->invincibilitytimer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
player->mo->color = (UINT16)(SKINCOLOR_PINK + (leveltime % (numskincolors - SKINCOLOR_PINK)));
|
player->mo->color = K_RainbowColor(leveltime);
|
||||||
|
|
||||||
// Resume normal music stuff.
|
// Resume normal music stuff.
|
||||||
if (player->invincibilitytimer == 1)
|
if (player->invincibilitytimer == 1)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue