mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-05-31 08:51:03 +00:00
Fixed synchronisation of skin changes and forceskin.
There's an outstanding issue - you can set forceskin to whatever you want to as the host. This needs to be fixed, but I'm commiting my successes first.
This commit is contained in:
parent
b66ded844e
commit
0060caaf1a
5 changed files with 14 additions and 10 deletions
|
@ -2576,7 +2576,7 @@ boolean R_SkinUnlock(INT32 playernum, INT32 skinnum)
|
|||
|| ((playernum != -1) ? (players[playernum].availabilities & (1 << skinnum)) : (unlockables[skins[skinnum].availability - 1].unlocked))
|
||||
|| (modeattacking) // If you have someone else's run you might as well take a look
|
||||
|| (Playing() && (R_SkinAvailable(mapheaderinfo[gamemap-1]->forcecharacter) == skinnum)) // Force 1.
|
||||
|| (netgame && !(server || adminplayer == consoleplayer) && (cv_forceskin.value == skinnum)) // Force 2.
|
||||
|| (netgame && (cv_forceskin.value == skinnum)) // Force 2.
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -2622,6 +2622,7 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
|
|||
player_t *player = &players[playernum];
|
||||
skin_t *skin = &skins[skinnum];
|
||||
UINT8 newcolor = 0;
|
||||
CONS_Printf("%d - %d\n", playernum, player->availabilities);
|
||||
|
||||
if (skinnum >= 0 && skinnum < numskins && R_SkinUnlock(playernum, skinnum)) // Make sure it exists!
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue