Ironman: Don't carry modified stats into the next race

This commit is contained in:
AJ Martinez 2022-11-03 22:15:40 -07:00
parent 1798ae9f4e
commit d95244a693
2 changed files with 12 additions and 1 deletions

View file

@ -2441,10 +2441,17 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
p->botvars.rival = botrival;
p->xtralife = xtralife;
if (betweenmaps)
if (betweenmaps)
{
p->fakeskin = MAXSKINS;
p->kartspeed = skins[p->skin].kartspeed;
p->kartweight = skins[p->skin].kartweight;
}
else
{
p->fakeskin = fakeskin;
}
p->lastfakeskin = lastfakeskin;
// SRB2kart

View file

@ -410,6 +410,10 @@ void ClearFakePlayerSkin(player_t* player)
if (!P_MobjWasRemoved(player->mo))
{
player->mo->skin = &skins[player->skin];
player->fakeskin = MAXSKINS;
player->kartspeed = skins[player->skin].kartspeed;
player->kartweight = skins[player->skin].kartweight;
player->charflags = skins[player->skin].flags;
S_StartSound(player->mo, sfx_s3k9f);
K_SpawnMagicianParticles(player->mo, 5);
}