mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-26 04:30:55 +00:00
Okay, I guess this DID need to be done. (Something from the old nights fixes branch which I didn't port over initially.)
This commit is contained in:
parent
1eaf35854d
commit
faabca552f
2 changed files with 3 additions and 3 deletions
|
@ -667,7 +667,6 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
|||
{
|
||||
player->mo->skin = &skins[DEFAULTNIGHTSSKIN];
|
||||
player->mo->color = skins[DEFAULTNIGHTSSKIN].prefcolor;
|
||||
player->mo->radius = FixedMul(skins[DEFAULTNIGHTSSKIN].radius, player->mo->scale);
|
||||
}
|
||||
|
||||
player->nightstime = player->startedtime = nighttime*TICRATE;
|
||||
|
|
|
@ -2669,16 +2669,17 @@ void SetPlayerSkinByNum(INT32 playernum, INT32 skinnum)
|
|||
|
||||
if (player->mo)
|
||||
{
|
||||
fixed_t radius = FixedMul(skin->radius, player->mo->scale);
|
||||
if ((player->powers[pw_carry] == CR_NIGHTSMODE) && (skin->sprites[SPR2_NGT0].numframes == 0)) // If you don't have a sprite for flying horizontally, use the default NiGHTS skin.
|
||||
{
|
||||
skin = &skins[DEFAULTNIGHTSSKIN];
|
||||
newcolor = ((skin->flags & SF_SUPER) ? skin->supercolor : skin->prefcolor);
|
||||
newcolor = skin->prefcolor; // will be updated in thinker to flashing
|
||||
}
|
||||
player->mo->skin = skin;
|
||||
if (newcolor)
|
||||
player->mo->color = newcolor;
|
||||
P_SetScale(player->mo, player->mo->scale);
|
||||
player->mo->radius = FixedMul(skin->radius, player->mo->scale);
|
||||
player->mo->radius = radius;
|
||||
|
||||
P_SetPlayerMobjState(player->mo, player->mo->state-states); // Prevent visual errors when switching between skins with differing number of frames
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue