mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Two changes to the supercolor stuff.
* Don't allow arbitrary numbers to be used for a skin's supercolor, only strings. * Devmode is no fun allowed mode, so turn off the god hyper flash there.
This commit is contained in:
parent
b3b6d5c4f9
commit
8f5258fc22
2 changed files with 4 additions and 4 deletions
|
@ -3415,7 +3415,7 @@ static void P_DoSuperStuff(player_t *player)
|
||||||
player->mo->health--;
|
player->mo->health--;
|
||||||
}
|
}
|
||||||
|
|
||||||
player->mo->color = (player->pflags & PF_GODMODE)
|
player->mo->color = (player->pflags & PF_GODMODE && cv_debug == 0)
|
||||||
? (SKINCOLOR_SUPERSILVER1 + 5*((leveltime >> 1) % 7)) // A wholesome easter egg.
|
? (SKINCOLOR_SUPERSILVER1 + 5*((leveltime >> 1) % 7)) // A wholesome easter egg.
|
||||||
: skins[player->skin].supercolor + (unsigned)abs( ( (signed)(leveltime >> 1) % 9) - 4); // This is where super flashing is handled.
|
: skins[player->skin].supercolor + (unsigned)abs( ( (signed)(leveltime >> 1) % 9) - 4); // This is where super flashing is handled.
|
||||||
|
|
||||||
|
|
|
@ -1159,9 +1159,9 @@ UINT8 R_GetColorByName(const char *name)
|
||||||
|
|
||||||
UINT8 R_GetSuperColorByName(const char *name)
|
UINT8 R_GetSuperColorByName(const char *name)
|
||||||
{
|
{
|
||||||
UINT8 color = (UINT8)atoi(name);
|
UINT8 color; /* = (UINT8)atoi(name); -- This isn't relevant to S_SKIN, which is the only way it's accessible right now. Let's simplify things.
|
||||||
if (color > MAXSKINCOLORS && color < MAXTRANSLATIONS)
|
if (color > MAXSKINCOLORS && color < MAXTRANSLATIONS && !((color - MAXSKINCOLORS) % 5))
|
||||||
return color;
|
return color;*/
|
||||||
for (color = 0; color < NUMSUPERCOLORS; color++)
|
for (color = 0; color < NUMSUPERCOLORS; color++)
|
||||||
if (!stricmp(Color_Names[color + MAXSKINCOLORS], name))
|
if (!stricmp(Color_Names[color + MAXSKINCOLORS], name))
|
||||||
return ((color*5) + MAXSKINCOLORS);
|
return ((color*5) + MAXSKINCOLORS);
|
||||||
|
|
Loading…
Reference in a new issue