mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-05 15:43:08 +00:00
Add "_Profile" relevant skin option
Uses profile skin/color for Tutorial courses
This commit is contained in:
parent
295e8dd0ce
commit
757c40844b
1 changed files with 15 additions and 3 deletions
|
|
@ -8046,7 +8046,7 @@ static void P_ShuffleTeams(void)
|
|||
|
||||
static void P_InitPlayers(void)
|
||||
{
|
||||
INT32 i, skin = -1, follower = -1;
|
||||
INT32 i, skin = -1, follower = -1, col = -1;
|
||||
|
||||
// Make sure objectplace is OFF when you first start the level!
|
||||
OP_ResetObjectplace();
|
||||
|
|
@ -8059,9 +8059,21 @@ static void P_InitPlayers(void)
|
|||
{
|
||||
// Get skin from name.
|
||||
if (mapheaderinfo[gamemap-1] && mapheaderinfo[gamemap-1]->relevantskin[0])
|
||||
{
|
||||
if (strcmp(mapheaderinfo[gamemap-1]->relevantskin, "_PROFILE") == 0)
|
||||
{
|
||||
profile_t *p = PR_GetProfile(cv_ttlprofilen.value);
|
||||
if (p)
|
||||
{
|
||||
skin = R_SkinAvailable(p->skinname);
|
||||
col = p->color;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
skin = R_SkinAvailable(mapheaderinfo[gamemap-1]->relevantskin);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
skin = R_SkinAvailable(DEFAULTSKIN);
|
||||
|
|
@ -8097,7 +8109,7 @@ static void P_InitPlayers(void)
|
|||
if (skin != -1)
|
||||
{
|
||||
SetPlayerSkinByNum(i, skin);
|
||||
players[i].skincolor = skins[skin].prefcolor;
|
||||
players[i].skincolor = (col >= 0 && col < numskincolors) ? col : skins[skin].prefcolor;
|
||||
|
||||
players[i].followerskin = follower;
|
||||
if (follower != -1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue