mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Let players switch skin at any time (even when moving) if they are playing alone
Playing in local splitscreen also counts as "alone". Actually removes the restriction of only being able to change skin when not moving altogether. It's annoying, especially if you're getting bullied in POSITION.
This commit is contained in:
parent
f9abe3f2e4
commit
041dd73555
3 changed files with 25 additions and 8 deletions
|
|
@ -1298,6 +1298,22 @@ UINT8 CanChangeSkin(INT32 playernum)
|
|||
return true;
|
||||
}
|
||||
|
||||
boolean CanChangeSkinWhilePlaying(INT32 playernum)
|
||||
{
|
||||
INT32 i;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; ++i)
|
||||
{
|
||||
if (D_IsPlayerHumanAndGaming(i) &&
|
||||
!P_IsLocalPlayer(&players[i]))
|
||||
{
|
||||
return CanChangeSkin(playernum);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void ForceAllSkins(INT32 forcedskin)
|
||||
{
|
||||
INT32 i, j;
|
||||
|
|
@ -5442,7 +5458,7 @@ static void Skin_OnChange(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (CanChangeSkin(consoleplayer) && !P_PlayerMoving(consoleplayer))
|
||||
if (CanChangeSkinWhilePlaying(consoleplayer))
|
||||
SendNameAndColor(0);
|
||||
else
|
||||
{
|
||||
|
|
@ -5461,7 +5477,7 @@ static void Skin2_OnChange(void)
|
|||
if (!Playing() || !splitscreen)
|
||||
return; // do whatever you want
|
||||
|
||||
if (CanChangeSkin(g_localplayers[1]) && !P_PlayerMoving(g_localplayers[1]))
|
||||
if (CanChangeSkinWhilePlaying(g_localplayers[1]))
|
||||
SendNameAndColor(1);
|
||||
else
|
||||
{
|
||||
|
|
@ -5475,7 +5491,7 @@ static void Skin3_OnChange(void)
|
|||
if (!Playing() || splitscreen < 2)
|
||||
return; // do whatever you want
|
||||
|
||||
if (CanChangeSkin(g_localplayers[2]) && !P_PlayerMoving(g_localplayers[2]))
|
||||
if (CanChangeSkinWhilePlaying(g_localplayers[2]))
|
||||
SendNameAndColor(2);
|
||||
else
|
||||
{
|
||||
|
|
@ -5489,7 +5505,7 @@ static void Skin4_OnChange(void)
|
|||
if (!Playing() || splitscreen < 3)
|
||||
return; // do whatever you want
|
||||
|
||||
if (CanChangeSkin(g_localplayers[3]) && !P_PlayerMoving(g_localplayers[3]))
|
||||
if (CanChangeSkinWhilePlaying(g_localplayers[3]))
|
||||
SendNameAndColor(3);
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -225,5 +225,6 @@ void D_SetPassword(const char *pw);
|
|||
|
||||
// used for the player setup menu
|
||||
UINT8 CanChangeSkin(INT32 playernum);
|
||||
boolean CanChangeSkinWhilePlaying(INT32 playernum);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9866,7 +9866,7 @@ static void M_SetupMultiPlayer(INT32 choice)
|
|||
break;
|
||||
|
||||
// disable skin changes if we can't actually change skins
|
||||
if (!CanChangeSkin(consoleplayer))
|
||||
if (!CanChangeSkinWhilePlaying(consoleplayer))
|
||||
MP_PlayerSetupMenu[2].status = (IT_GRAYEDOUT);
|
||||
else
|
||||
MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER|IT_STRING);
|
||||
|
|
@ -9909,7 +9909,7 @@ static void M_SetupMultiPlayer2(INT32 choice)
|
|||
break;
|
||||
|
||||
// disable skin changes if we can't actually change skins
|
||||
if (splitscreen && !CanChangeSkin(g_localplayers[1]))
|
||||
if (splitscreen && !CanChangeSkinWhilePlaying(g_localplayers[1]))
|
||||
MP_PlayerSetupMenu[2].status = (IT_GRAYEDOUT);
|
||||
else
|
||||
MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER | IT_STRING);
|
||||
|
|
@ -9952,7 +9952,7 @@ static void M_SetupMultiPlayer3(INT32 choice)
|
|||
break;
|
||||
|
||||
// disable skin changes if we can't actually change skins
|
||||
if (splitscreen > 1 && !CanChangeSkin(g_localplayers[2]))
|
||||
if (splitscreen > 1 && !CanChangeSkinWhilePlaying(g_localplayers[2]))
|
||||
MP_PlayerSetupMenu[2].status = (IT_GRAYEDOUT);
|
||||
else
|
||||
MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER | IT_STRING);
|
||||
|
|
@ -9995,7 +9995,7 @@ static void M_SetupMultiPlayer4(INT32 choice)
|
|||
break;
|
||||
|
||||
// disable skin changes if we can't actually change skins
|
||||
if (splitscreen > 2 && !CanChangeSkin(g_localplayers[3]))
|
||||
if (splitscreen > 2 && !CanChangeSkinWhilePlaying(g_localplayers[3]))
|
||||
MP_PlayerSetupMenu[2].status = (IT_GRAYEDOUT);
|
||||
else
|
||||
MP_PlayerSetupMenu[2].status = (IT_KEYHANDLER | IT_STRING);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue