mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
d_netcmd.c: Fix errors with multiple _OnChange functions
- Skin_OnChange
- Now always checks for cheats for any machine-local player skin change in non-netgame, non-K_CanChangeRules contexts
- Previously applied only to consoleplayer in Time Trial
- Color_OnChange
- Fixes straight up incorrect condition that prevented honest players from changing color mid-game via the developer console
This commit is contained in:
parent
e7dc2cda0c
commit
b0ee900422
1 changed files with 5 additions and 8 deletions
|
|
@ -6833,14 +6833,11 @@ static void Skin_OnChange(const UINT8 p)
|
|||
return;
|
||||
}
|
||||
|
||||
if (p == 0)
|
||||
if (!CV_CheatsEnabled() && !(netgame || K_CanChangeRules(false))
|
||||
&& (gamestate != GS_WAITINGPLAYERS)) // allows command line -warp x +skin y
|
||||
{
|
||||
if (!CV_CheatsEnabled() && !(multiplayer || netgame) // In single player.
|
||||
&& (gamestate != GS_WAITINGPLAYERS)) // allows command line -warp x +skin y
|
||||
{
|
||||
CV_StealthSet(&cv_skin[p], skins[players[g_localplayers[p]].skin].name);
|
||||
return;
|
||||
}
|
||||
CV_StealthSet(&cv_skin[p], skins[players[g_localplayers[p]].skin].name);
|
||||
return;
|
||||
}
|
||||
|
||||
if (CanChangeSkin(g_localplayers[p]))
|
||||
|
|
@ -6890,7 +6887,7 @@ static void Color_OnChange(const UINT8 p)
|
|||
UINT16 color = cv_playercolor[p].value;
|
||||
boolean colorisgood = (color == SKINCOLOR_NONE || K_ColorUsable(color, false, true) == true);
|
||||
|
||||
if (Playing() && splitscreen < p)
|
||||
if (Playing() && p <= splitscreen)
|
||||
{
|
||||
if (P_PlayerMoving(g_localplayers[p]) == true)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue