From 2da8aea8992b40d3fa831929c1e7a1ff0b194a71 Mon Sep 17 00:00:00 2001 From: Lactozilla Date: Tue, 28 Jan 2025 16:07:29 -0300 Subject: [PATCH] Fix #1394 --- src/d_player.h | 4 ++-- src/r_skins.c | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/d_player.h b/src/d_player.h index cdb547d3b..c096ecd9f 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -49,7 +49,7 @@ typedef enum SF_FASTEDGE = 1<<13, // Faster edge teeter? SF_MULTIABILITY = 1<<14, // Revenge of Final Demo. SF_NONIGHTSROTATION = 1<<15, // Disable sprite rotation for NiGHTS - SF_NONIGHTSSUPER = 1<<16, // Disable super colors for NiGHTS (if you have SF_SUPER) + SF_NONIGHTSSUPER = 1<<16, // Disable super sprites and colors for NiGHTS SF_NOSUPERSPRITES = 1<<17, // Don't use super sprites while super SF_NOSUPERJUMPBOOST = 1<<18, // Disable the jump boost given while super (i.e. Knuckles) SF_CANBUSTWALLS = 1<<19, // Can naturally bust walls on contact? (i.e. Knuckles) diff --git a/src/r_skins.c b/src/r_skins.c index f364273e8..842350d26 100644 --- a/src/r_skins.c +++ b/src/r_skins.c @@ -2,7 +2,7 @@ //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -80,10 +80,19 @@ UINT16 P_ApplySuperFlagToSprite2(UINT16 spr2, mobj_t *mobj) { if (mobj->player) { - if (mobj->player->charflags & SF_NOSUPERSPRITES || (mobj->player->powers[pw_carry] == CR_NIGHTSMODE && (mobj->player->charflags & SF_NONIGHTSSUPER))) + boolean is_nights = mobj->player->powers[pw_carry] == CR_NIGHTSMODE; + + if (mobj->player->charflags & SF_NOSUPERSPRITES || (is_nights && (mobj->player->charflags & SF_NONIGHTSSUPER))) spr2 &= ~SPR2F_SUPER; - else if (mobj->player->powers[pw_super] || (mobj->player->powers[pw_carry] == CR_NIGHTSMODE && (mobj->player->charflags & SF_SUPER))) + else if (mobj->player->powers[pw_super] || (is_nights && (mobj->player->charflags & SF_SUPER))) spr2 |= SPR2F_SUPER; + + // Special case for transforming when you are NiGHTS. + // Do NOT apply the super sprites in this situation, even if they exist. + if (is_nights && mobj->state >= &states[S_PLAY_NIGHTS_TRANS1] && mobj->state <= &states[S_PLAY_NIGHTS_TRANS6]) + { + spr2 &= ~SPR2F_SUPER; + } } if (spr2 & SPR2F_SUPER)