This commit is contained in:
Lactozilla 2025-01-28 16:07:29 -03:00
parent 8701ef41f6
commit 2da8aea899
2 changed files with 14 additions and 5 deletions

View file

@ -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)

View file

@ -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)