mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-25 23:11:20 +00:00
K_GetEffectiveFollowerColor: Handle playercolor being default/NONE in a cleaner, more direct fashion
Fixes the FOLLOWERCOLOR_OPPOSITE handling being wrong in this circumstance
This commit is contained in:
parent
0fe6fb2fa5
commit
0d203f5dbb
1 changed files with 11 additions and 5 deletions
|
|
@ -250,17 +250,23 @@ UINT16 K_GetEffectiveFollowerColor(UINT16 followercolor, follower_t *follower, U
|
|||
return followercolor;
|
||||
}
|
||||
|
||||
if (playercolor == SKINCOLOR_NONE) // get default color
|
||||
{
|
||||
if (playerskin == NULL)
|
||||
{
|
||||
// Nothing from this line down is valid if playerskin is invalid, just guess Eggman?
|
||||
playerskin = &skins[0];
|
||||
}
|
||||
|
||||
playercolor = playerskin->prefcolor;
|
||||
}
|
||||
|
||||
if (followercolor == FOLLOWERCOLOR_OPPOSITE) // "Opposite"
|
||||
{
|
||||
return skincolors[playercolor].invcolor;
|
||||
}
|
||||
|
||||
// "Match"
|
||||
if (playercolor == SKINCOLOR_NONE && playerskin != NULL)
|
||||
{
|
||||
return playerskin->prefcolor;
|
||||
}
|
||||
|
||||
return playercolor;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue