From 51f0d6f2e272a1516657ee5c2d44eab0181da6b4 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Thu, 1 Jun 2017 22:20:36 +0100 Subject: [PATCH] Import some NiGHTS stuff from some-more-nights-fixes, so I can delete that old branch. --- src/d_clisrv.c | 12 ++++++++++-- src/p_user.c | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 929b821eb..187d6f857 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -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); } diff --git a/src/p_user.c b/src/p_user.c index 9589bafbe..8c9426cfe 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -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;