mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Actually track lastfakeskin!
Tremendous whoopsie: turns out there's no code that actually saves it outside of netsync. This is now fixed. Also now allows you to roll Eggman as your first skin, and doesn't cause immediate characterswaps for midgame joiners.
This commit is contained in:
parent
3ee8bbbfc4
commit
c2183a626c
3 changed files with 15 additions and 1 deletions
|
|
@ -2551,6 +2551,7 @@ void CL_ClearPlayer(INT32 playernum)
|
||||||
memset(&players[playernum], 0, sizeof (player_t));
|
memset(&players[playernum], 0, sizeof (player_t));
|
||||||
|
|
||||||
players[playernum].followerskin = -1; // don't have a ghost follower
|
players[playernum].followerskin = -1; // don't have a ghost follower
|
||||||
|
players[playernum].fakeskin = players[playernum].lastfakeskin = MAXSKINS; // don't avoid eggman
|
||||||
|
|
||||||
RemoveAdminPlayer(playernum); // don't stay admin after you're gone
|
RemoveAdminPlayer(playernum); // don't stay admin after you're gone
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1185,6 +1185,14 @@ void G_ConsGhostTic(INT32 playernum)
|
||||||
players[playernum].kartweight = ghostext[playernum].kartweight;
|
players[playernum].kartweight = ghostext[playernum].kartweight;
|
||||||
players[playernum].charflags = ghostext[playernum].charflags;
|
players[playernum].charflags = ghostext[playernum].charflags;
|
||||||
|
|
||||||
|
if (demo.skinlist[demo.currentskinid[playernum]].flags & SF_IRONMAN)
|
||||||
|
{
|
||||||
|
players[playernum].lastfakeskin = players[playernum].fakeskin;
|
||||||
|
players[playernum].fakeskin =
|
||||||
|
(ghostext[playernum].skinid == demo.currentskinid[playernum])
|
||||||
|
? MAXSKINS
|
||||||
|
: ghostext[playernum].skinid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,12 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
|
||||||
// Set mo skin but not player_t skin, for ironman
|
// Set mo skin but not player_t skin, for ironman
|
||||||
void SetFakePlayerSkin(player_t* player, INT32 skinid)
|
void SetFakePlayerSkin(player_t* player, INT32 skinid)
|
||||||
{
|
{
|
||||||
player->fakeskin = skinid;
|
if (player->fakeskin != skinid)
|
||||||
|
{
|
||||||
|
if (player->fakeskin != MAXSKINS)
|
||||||
|
player->lastfakeskin = player->fakeskin;
|
||||||
|
player->fakeskin = skinid;
|
||||||
|
}
|
||||||
|
|
||||||
if (demo.playback)
|
if (demo.playback)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue