Import some NiGHTS stuff from some-more-nights-fixes, so I can delete that old branch.

This commit is contained in:
toasterbabe 2017-06-01 22:20:36 +01:00
parent 3857b720cd
commit 51f0d6f2e2
2 changed files with 12 additions and 3 deletions

View file

@ -768,8 +768,16 @@ static void resynch_read_player(resynch_pak *rsp)
players[i].mo->scalespeed = LONG(rsp->scalespeed);
// And finally, SET THE MOBJ SKIN damn it.
players[i].mo->skin = &skins[players[i].skin];
players[i].mo->color = players[i].skincolor;
if ((players[i].powers[pw_carry] == CR_NIGHTSMODE) && (skins[players[i].skin].sprites[SPR2_NGT0].numframes == 0))
{
players[i].mo->skin = &skins[DEFAULTNIGHTSSKIN];
players[i].mo->color = skins[DEFAULTNIGHTSSKIN].prefcolor; // this will be corrected by thinker to super flash
}
else
{
players[i].mo->skin = &skins[players[i].skin];
players[i].mo->color = players[i].skincolor; // this will be corrected by thinker to super flash/mario star
}
P_SetThingPosition(players[i].mo);
}

View file

@ -666,7 +666,8 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
if (skins[player->skin].sprites[SPR2_NGT0].numframes == 0) // If you don't have a sprite for flying horizontally, use the default NiGHTS skin.
{
player->mo->skin = &skins[DEFAULTNIGHTSSKIN];
player->mo->color = ((skin_t *)(player->mo->skin))->prefcolor;
player->mo->color = skins[DEFAULTNIGHTSSKIN].prefcolor;
player->mo->radius = FixedMul(skins[DEFAULTNIGHTSSKIN].radius, player->mo->scale);
}
player->nightstime = player->startedtime = nighttime*TICRATE;