mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 10:52:23 +00:00
Mario mode is boring again. (I'm going to revert this commit as soon as possible, but shield_actions needs to be clean of Mario stuff for now.)
This commit is contained in:
parent
a5a6ceff71
commit
3ce411b62a
9 changed files with 66 additions and 212 deletions
|
@ -194,7 +194,6 @@ typedef enum
|
|||
SH_PITY = 1, // the world's most basic shield ever, given to players who suck at Match
|
||||
SH_WHIRLWIND,
|
||||
SH_ARMAGEDDON,
|
||||
SH_FIREFLOWER,
|
||||
|
||||
// normal shields that use flags
|
||||
SH_ATTRACT = SH_PROTECTELECTRIC,
|
||||
|
@ -210,9 +209,9 @@ typedef enum
|
|||
SH_FORCEHP = 0xFF, // to be used as a bitmask only
|
||||
|
||||
// Mostly for use with Mario mode.
|
||||
SH_MUSHROOM = 0x200,
|
||||
SH_FIREFLOWER = 0x200,
|
||||
|
||||
SH_STACK = SH_MUSHROOM, // second-layer shields
|
||||
SH_STACK = SH_FIREFLOWER, // second-layer shields
|
||||
SH_NOSTACK = ~SH_STACK
|
||||
} shieldtype_t; // pw_shield
|
||||
|
||||
|
@ -241,7 +240,6 @@ typedef enum
|
|||
pw_underwater, // underwater timer
|
||||
pw_spacetime, // In space, no one can hear you spin!
|
||||
pw_extralife, // Extra Life timer
|
||||
pw_marioflashing, // Getting/losing powerup
|
||||
|
||||
pw_super, // Are you super?
|
||||
pw_gravityboots, // gravity boots
|
||||
|
|
|
@ -7126,7 +7126,6 @@ struct {
|
|||
{"SH_PITY",SH_PITY},
|
||||
{"SH_WHIRLWIND",SH_WHIRLWIND},
|
||||
{"SH_ARMAGEDDON",SH_ARMAGEDDON},
|
||||
{"SH_FIREFLOWER",SH_FIREFLOWER},
|
||||
// normal shields that use flags
|
||||
{"SH_ATTRACT",SH_ATTRACT},
|
||||
{"SH_ELEMENTAL",SH_ELEMENTAL},
|
||||
|
@ -7138,7 +7137,7 @@ struct {
|
|||
{"SH_FORCE",SH_FORCE},
|
||||
{"SH_FORCEHP",SH_FORCEHP}, // to be used as a bitmask only
|
||||
// Mostly for use with Mario mode.
|
||||
{"SH_MUSHROOM", SH_MUSHROOM},
|
||||
{"SH_FIREFLOWER", SH_FIREFLOWER},
|
||||
{"SH_STACK",SH_STACK},
|
||||
{"SH_NOSTACK",SH_NOSTACK},
|
||||
|
||||
|
|
|
@ -2196,9 +2196,6 @@ void G_PlayerReborn(INT32 player)
|
|||
p->health = 1; // 0 rings
|
||||
p->panim = PA_IDLE; // standing animation
|
||||
|
||||
if (mariomode)
|
||||
p->powers[pw_shield] = SH_MUSHROOM; // start big
|
||||
|
||||
if ((netgame || multiplayer) && !p->spectator)
|
||||
p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent
|
||||
|
||||
|
|
|
@ -3061,10 +3061,9 @@ void A_JumpShield(mobj_t *actor)
|
|||
|
||||
player = actor->target->player;
|
||||
|
||||
if (P_SwitchShield(player, SH_WHIRLWIND))
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
else
|
||||
S_StartSound(player->mo, sfx_itemup);
|
||||
P_SwitchShield(player, SH_WHIRLWIND);
|
||||
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
}
|
||||
|
||||
// Function: A_RingShield
|
||||
|
@ -3090,10 +3089,9 @@ void A_RingShield(mobj_t *actor)
|
|||
|
||||
player = actor->target->player;
|
||||
|
||||
if (P_SwitchShield(player, SH_ATTRACT))
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
else
|
||||
S_StartSound(player->mo, sfx_itemup);
|
||||
P_SwitchShield(player, SH_ATTRACT);
|
||||
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
}
|
||||
|
||||
// Function: A_RingBox
|
||||
|
@ -3293,7 +3291,8 @@ void A_BombShield(mobj_t *actor)
|
|||
P_BlackOw(player);
|
||||
|
||||
// Now we know for certain that we don't have a bomb shield, so add one. :3
|
||||
P_SwitchShield(player, SH_ARMAGEDDON); // will never return false, so no need for sound test
|
||||
P_SwitchShield(player, SH_ARMAGEDDON);
|
||||
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
}
|
||||
|
||||
|
@ -3320,10 +3319,9 @@ void A_WaterShield(mobj_t *actor)
|
|||
|
||||
player = actor->target->player;
|
||||
|
||||
if (P_SwitchShield(player, SH_ELEMENTAL))
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
else
|
||||
S_StartSound(player->mo, sfx_itemup);
|
||||
P_SwitchShield(player, SH_ELEMENTAL);
|
||||
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
}
|
||||
|
||||
// Function: A_ForceShield
|
||||
|
@ -3356,10 +3354,9 @@ void A_ForceShield(mobj_t *actor)
|
|||
|
||||
player = actor->target->player;
|
||||
|
||||
if (P_SwitchShield(player, SH_FORCE|locvar1))
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
else
|
||||
S_StartSound(player->mo, sfx_itemup);
|
||||
P_SwitchShield(player, SH_FORCE|locvar1);
|
||||
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
}
|
||||
|
||||
// Function: A_PityShield
|
||||
|
@ -3389,10 +3386,9 @@ void A_PityShield(mobj_t *actor)
|
|||
|
||||
player = actor->target->player;
|
||||
|
||||
if (P_SwitchShield(player, SH_PITY))
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
else
|
||||
S_StartSound(player->mo, sfx_itemup);
|
||||
P_SwitchShield(player, SH_PITY);
|
||||
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
}
|
||||
|
||||
// Function: A_FlameShield
|
||||
|
@ -3418,10 +3414,9 @@ void A_FlameShield(mobj_t *actor)
|
|||
|
||||
player = actor->target->player;
|
||||
|
||||
if (P_SwitchShield(player, SH_FLAMEAURA))
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
else
|
||||
S_StartSound(player->mo, sfx_itemup);
|
||||
P_SwitchShield(player, SH_FLAMEAURA);
|
||||
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
}
|
||||
|
||||
// Function: A_BubbleShield
|
||||
|
@ -3447,10 +3442,9 @@ void A_BubbleShield(mobj_t *actor)
|
|||
|
||||
player = actor->target->player;
|
||||
|
||||
if (P_SwitchShield(player, SH_BUBBLEWRAP))
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
else
|
||||
S_StartSound(player->mo, sfx_itemup);
|
||||
P_SwitchShield(player, SH_BUBBLEWRAP);
|
||||
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
}
|
||||
|
||||
// Function: A_ThunderShield
|
||||
|
@ -3476,10 +3470,9 @@ void A_ThunderShield(mobj_t *actor)
|
|||
|
||||
player = actor->target->player;
|
||||
|
||||
if (P_SwitchShield(player, SH_THUNDERCOIN))
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
else
|
||||
S_StartSound(player->mo, sfx_itemup);
|
||||
P_SwitchShield(player, SH_THUNDERCOIN);
|
||||
|
||||
S_StartSound(player->mo, actor->info->seesound);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1141,27 +1141,16 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
case MT_FIREFLOWER:
|
||||
if (player->bot)
|
||||
return;
|
||||
{
|
||||
mobj_t *scoremobj = P_SpawnMobj(toucher->x, toucher->y, toucher->z + (toucher->height / 2), MT_SCORE);
|
||||
P_SetMobjState(scoremobj, mobjinfo[MT_SCORE].spawnstate+3); // 1000
|
||||
P_AddPlayerScore(player, 1000);
|
||||
}
|
||||
|
||||
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_FIREFLOWER)
|
||||
{
|
||||
S_StartSound(toucher, sfx_itemup);
|
||||
break;
|
||||
}
|
||||
else
|
||||
S_StartSound(toucher, sfx_mario3);
|
||||
S_StartSound(toucher, sfx_mario3);
|
||||
|
||||
if (mariomode)
|
||||
player->powers[pw_shield] = (player->powers[pw_shield] & SH_NOSTACK)|SH_FIREFLOWER;
|
||||
|
||||
if (!(player->powers[pw_super] || (mariomode && player->powers[pw_invulnerability])))
|
||||
{
|
||||
toucher->movecount = player->powers[pw_shield];
|
||||
player->powers[pw_marioflashing] = MARIOFLASHINGTICS;
|
||||
player->mo->color = SKINCOLOR_WHITE;
|
||||
G_GhostAddColor(GHC_FIREFLOWER);
|
||||
}
|
||||
player->powers[pw_shield] = (mariomode ? SH_MUSHROOM : player->powers[pw_shield] & SH_STACK)|SH_FIREFLOWER;
|
||||
P_SpawnShieldOrb(player);
|
||||
|
||||
break;
|
||||
|
||||
|
@ -1226,21 +1215,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
|
||||
S_StartSound(toucher, special->info->painsound);
|
||||
|
||||
if (mariomode)
|
||||
{
|
||||
mobj_t *scoremobj = P_SpawnMobj(toucher->x, toucher->y, toucher->z + (toucher->height / 2), MT_SCORE);
|
||||
P_SetMobjState(scoremobj, mobjinfo[MT_SCORE].spawnstate+7); // 2000
|
||||
P_AddPlayerScore(player, 2000);
|
||||
if (!player->powers[pw_shield])
|
||||
{
|
||||
S_StartSound(toucher, sfx_mario3);
|
||||
player->mo->movecount = player->powers[pw_shield];
|
||||
player->powers[pw_marioflashing] = MARIOFLASHINGTICS;
|
||||
player->powers[pw_shield] = SH_MUSHROOM;
|
||||
P_SpawnShieldOrb(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (!(netgame && circuitmap && player != &players[consoleplayer]))
|
||||
P_SetMobjState(special, special->info->painstate);
|
||||
return;
|
||||
|
@ -2300,14 +2274,9 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
|
||||
case MT_PLAYER:
|
||||
{
|
||||
boolean mariodeathpit = (mariomode && damagetype == DMG_DEATHPIT);
|
||||
target->fuse = TICRATE*3; // timer before mobj disappears from view (even if not an actual player)
|
||||
if (!mariodeathpit)
|
||||
{
|
||||
if (mariomode)
|
||||
target->player->powers[pw_marioflashing] = MARIOFLASHINGTICS;
|
||||
target->momx = target->momy = target->momz = 0;
|
||||
}
|
||||
target->momx = target->momy = target->momz = 0;
|
||||
|
||||
if (damagetype == DMG_DROWNED) // drowned
|
||||
{
|
||||
target->movedir = damagetype; // we're MOVING the Damage Into anotheR function... Okay, this is a bit of a hack.
|
||||
|
@ -2319,8 +2288,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!mariodeathpit)
|
||||
P_SetObjectMomZ(target, 14*FRACUNIT, false);
|
||||
P_SetObjectMomZ(target, 14*FRACUNIT, false);
|
||||
if ((source && source->type == MT_SPIKE) || damagetype == DMG_SPIKE) // Spikes
|
||||
S_StartSound(target, sfx_spkdth);
|
||||
else
|
||||
|
@ -2680,11 +2648,8 @@ static void P_KillPlayer(player_t *player, mobj_t *source, INT32 damage)
|
|||
if (source && (gametype == GT_MATCH || gametype == GT_TEAMMATCH || gametype == GT_CTF))
|
||||
P_PlayerRingBurst(player, player->health - 1);
|
||||
|
||||
if (!mariomode) // Get rid of shield
|
||||
{
|
||||
player->powers[pw_shield] = SH_NONE;
|
||||
player->mo->color = player->skincolor;
|
||||
}
|
||||
player->powers[pw_shield] = SH_NONE;
|
||||
player->mo->color = player->skincolor;
|
||||
|
||||
// Get rid of emeralds
|
||||
player->powers[pw_emeralds] = 0;
|
||||
|
@ -2780,16 +2745,20 @@ static inline void P_SuperDamage(player_t *player, mobj_t *inflictor, mobj_t *so
|
|||
|
||||
void P_RemoveShield(player_t *player)
|
||||
{
|
||||
boolean fireflower = ((player->powers[pw_shield] & SH_NOSTACK) == SH_FIREFLOWER);
|
||||
if (player->powers[pw_shield] & SH_FORCE)
|
||||
{ // Multi-hit
|
||||
if ((player->powers[pw_shield] & SH_FORCEHP) == 0)
|
||||
player->powers[pw_shield] &= SH_STACK;
|
||||
else
|
||||
if (player->powers[pw_shield] & SH_FORCEHP)
|
||||
player->powers[pw_shield]--;
|
||||
else
|
||||
player->powers[pw_shield] &= SH_STACK;
|
||||
}
|
||||
else if ((player->powers[pw_shield] & SH_NOSTACK) == SH_NONE)
|
||||
{ // Second layer shields
|
||||
if (((player->powers[pw_shield] & SH_STACK) == SH_FIREFLOWER) && !(player->powers[pw_super] || (mariomode && player->powers[pw_invulnerability])))
|
||||
{
|
||||
player->mo->color = player->skincolor;
|
||||
G_GhostAddColor(GHC_NORMAL);
|
||||
}
|
||||
player->powers[pw_shield] = SH_NONE;
|
||||
}
|
||||
else if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ARMAGEDDON) // Give them what's coming to them!
|
||||
|
@ -2799,11 +2768,6 @@ void P_RemoveShield(player_t *player)
|
|||
}
|
||||
else
|
||||
player->powers[pw_shield] = player->powers[pw_shield] & SH_STACK;
|
||||
if (fireflower && !(player->powers[pw_super] || (mariomode && player->powers[pw_invulnerability])))
|
||||
{
|
||||
player->mo->color = player->skincolor;
|
||||
G_GhostAddColor(GHC_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
static void P_ShieldDamage(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 damage)
|
||||
|
@ -2815,14 +2779,7 @@ static void P_ShieldDamage(player_t *player, mobj_t *inflictor, mobj_t *source,
|
|||
|
||||
P_ForceFeed(player, 40, 10, TICRATE, 40 + min(damage, 100)*2);
|
||||
|
||||
if (mariomode)
|
||||
{
|
||||
S_StartSound(player->mo, sfx_mario8);
|
||||
// Burst weapons and emeralds in Match/CTF only
|
||||
if (!player->powers[pw_shield] && (gametype == GT_MATCH || gametype == GT_TEAMMATCH || gametype == GT_CTF))
|
||||
P_PlayerRingBurst(player, 0);
|
||||
}
|
||||
else if (source && (source->type == MT_SPIKE || (source->type == MT_NULL && source->threshold == 43))) // spikes
|
||||
if (source && (source->type == MT_SPIKE || (source->type == MT_NULL && source->threshold == 43))) // spikes
|
||||
S_StartSound(player->mo, sfx_spkdth);
|
||||
else
|
||||
S_StartSound (player->mo, sfx_shldls); // Ba-Dum! Shield loss.
|
||||
|
@ -3133,7 +3090,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
P_ShieldDamage(player, inflictor, source, damage);
|
||||
damage = 0;
|
||||
}
|
||||
else if (!mariomode && player->mo->health > 1) // No shield but have rings.
|
||||
else if (player->mo->health > 1) // No shield but have rings.
|
||||
{
|
||||
damage = player->mo->health - 1;
|
||||
P_RingDamage(player, inflictor, source, damage, damagetype);
|
||||
|
@ -3295,11 +3252,11 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
|
|||
// Spill the ammo
|
||||
P_PlayerWeaponAmmoBurst(player);
|
||||
|
||||
if (mariomode) return;
|
||||
|
||||
for (i = 0; i < num_rings; i++)
|
||||
{
|
||||
INT32 objType = mobjinfo[MT_RING].reactiontime;
|
||||
if (mariomode)
|
||||
objType = mobjinfo[MT_COIN].reactiontime;
|
||||
|
||||
z = player->mo->z;
|
||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||
|
|
|
@ -62,12 +62,9 @@
|
|||
#define twodlevel (maptol & TOL_2D)
|
||||
|
||||
#define mariomode (maptol & TOL_MARIO)
|
||||
#define shortmario(player) ((player && mariomode && !player->powers[pw_shield]) ? 1 : 0)
|
||||
|
||||
#define MARIOFLASHINGTICS 21
|
||||
|
||||
#define P_GetPlayerHeight(player) (FixedMul(player->height, player->mo->scale) >> shortmario(player))
|
||||
#define P_GetPlayerSpinHeight(player) (FixedMul(player->spinheight, player->mo->scale) >> shortmario(player))
|
||||
#define P_GetPlayerHeight(player) FixedMul(player->height, player->mo->scale)
|
||||
#define P_GetPlayerSpinHeight(player) FixedMul(player->spinheight, player->mo->scale)
|
||||
|
||||
//
|
||||
// P_TICK
|
||||
|
@ -146,7 +143,7 @@ boolean P_InQuicksand(mobj_t *mo);
|
|||
void P_SetObjectMomZ(mobj_t *mo, fixed_t value, boolean relative);
|
||||
void P_RestoreMusic(player_t *player);
|
||||
void P_SpawnShieldOrb(player_t *player);
|
||||
boolean P_SwitchShield(player_t *player, UINT16 shieldtype);
|
||||
void P_SwitchShield(player_t *player, UINT16 shieldtype);
|
||||
mobj_t *P_SpawnGhostMobj(mobj_t *mobj);
|
||||
void P_GivePlayerRings(player_t *player, INT32 num_rings);
|
||||
void P_GivePlayerLives(player_t *player, INT32 numlives);
|
||||
|
|
35
src/p_mobj.c
35
src/p_mobj.c
|
@ -4088,32 +4088,6 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
|||
I_Assert(mobj->player != NULL);
|
||||
I_Assert(!P_MobjWasRemoved(mobj));
|
||||
|
||||
if (mobj->player->powers[pw_marioflashing])
|
||||
{
|
||||
if (!mobj->player->powers[pw_nocontrol]++)
|
||||
mobj->player->powers[pw_nocontrol]++;
|
||||
|
||||
if (!(--mobj->player->powers[pw_marioflashing] % 4))
|
||||
{
|
||||
UINT16 shieldswitch = mobj->player->powers[pw_shield];
|
||||
mobj->player->powers[pw_shield] = mobj->movecount;
|
||||
mobj->movecount = shieldswitch;
|
||||
if (mobj->player->powers[pw_shield] & SH_NOSTACK && (mobj->player->powers[pw_shield] & SH_NOSTACK) != (mobj->movecount & SH_NOSTACK))
|
||||
P_SpawnShieldOrb(mobj->player);
|
||||
if ((mobj->player->powers[pw_shield] & SH_NOSTACK) != SH_FIREFLOWER && (mobj->movecount & SH_NOSTACK) == SH_FIREFLOWER
|
||||
&& !(mobj->player->powers[pw_super] || (mariomode && mobj->player->powers[pw_invulnerability])))
|
||||
{
|
||||
mobj->color = mobj->player->skincolor;
|
||||
G_GhostAddColor(GHC_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
if (mobj->player->powers[pw_flashing] && mobj->player->powers[pw_flashing] < UINT16_MAX && mobj->player->powers[pw_flashing] > flashingtics)
|
||||
if (--(mobj->player->powers[pw_flashing]) == flashingtics)
|
||||
mobj->player->powers[pw_flashing]--;
|
||||
return;
|
||||
}
|
||||
|
||||
P_MobjCheckWater(mobj);
|
||||
|
||||
#ifdef ESLOPE
|
||||
|
@ -6433,9 +6407,9 @@ static boolean P_ShieldLook(mobj_t *thing, shieldtype_t shield)
|
|||
thing->x = thing->target->x;
|
||||
thing->y = thing->target->y;
|
||||
if (thing->eflags & MFE_VERTICALFLIP)
|
||||
thing->z = thing->target->z + ((thing->target->height - thing->height + FixedDiv(P_GetPlayerHeight(thing->target->player) - thing->target->height, 3*FRACUNIT)) << shortmario(thing->target->player)) - FixedMul(2*FRACUNIT, thing->target->scale);
|
||||
thing->z = thing->target->z + (thing->target->height - thing->height + FixedDiv(P_GetPlayerHeight(thing->target->player) - thing->target->height, 3*FRACUNIT)) - FixedMul(2*FRACUNIT, thing->target->scale);
|
||||
else
|
||||
thing->z = thing->target->z - ((FixedDiv(P_GetPlayerHeight(thing->target->player) - thing->target->height, 3*FRACUNIT)) << shortmario(thing->target->player)) + FixedMul(2*FRACUNIT, thing->target->scale);
|
||||
thing->z = thing->target->z - (FixedDiv(P_GetPlayerHeight(thing->target->player) - thing->target->height, 3*FRACUNIT)) + FixedMul(2*FRACUNIT, thing->target->scale);
|
||||
P_SetThingPosition(thing);
|
||||
P_CheckPosition(thing, thing->x, thing->y);
|
||||
|
||||
|
@ -7240,11 +7214,6 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
break;
|
||||
case MT_PLAYER:
|
||||
/// \todo Have the player's dead body completely finish its animation even if they've already respawned.
|
||||
if (mobj->player && mobj->player->powers[pw_marioflashing])
|
||||
{
|
||||
mobj->player->powers[pw_marioflashing]--;
|
||||
return; // don't do any momz
|
||||
}
|
||||
if (!(mobj->flags2 & MF2_DONTDRAW))
|
||||
{
|
||||
if (!mobj->fuse)
|
||||
|
|
61
src/p_user.c
61
src/p_user.c
|
@ -793,7 +793,6 @@ void P_DoPlayerPain(player_t *player, mobj_t *source, mobj_t *inflictor)
|
|||
if (player->powers[pw_carry] == CR_ROPEHANG)
|
||||
P_SetTarget(&player->mo->tracer, NULL);
|
||||
|
||||
if (!mariomode)
|
||||
{
|
||||
angle_t ang;
|
||||
fixed_t fallbackspeed;
|
||||
|
@ -860,12 +859,6 @@ void P_DoPlayerPain(player_t *player, mobj_t *source, mobj_t *inflictor)
|
|||
}
|
||||
|
||||
player->powers[pw_flashing] = flashingtics;
|
||||
if (mariomode)
|
||||
{
|
||||
player->powers[pw_marioflashing] = MARIOFLASHINGTICS;
|
||||
player->powers[pw_flashing] += MARIOFLASHINGTICS;
|
||||
player->mo->movecount = player->powers[pw_shield];
|
||||
}
|
||||
|
||||
if (player->timeshit != UINT8_MAX)
|
||||
++player->timeshit;
|
||||
|
@ -928,7 +921,7 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings)
|
|||
{
|
||||
INT32 gainlives = 0;
|
||||
|
||||
while ((mariomode || player->xtralife < maxXtraLife) && player->health > 100 * (player->xtralife+1))
|
||||
while (player->xtralife < maxXtraLife && player->health > 100 * (player->xtralife+1))
|
||||
{
|
||||
++gainlives;
|
||||
++player->xtralife;
|
||||
|
@ -940,13 +933,6 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings)
|
|||
P_PlayLivesJingle(player);
|
||||
}
|
||||
}
|
||||
|
||||
if (mariomode && player->health > 100 && !G_RingSlingerGametype() && !G_TagGametype())
|
||||
{
|
||||
player->mo->health = 1 + (player->health - 1) % 100;
|
||||
player->health = player->mo->health;
|
||||
player->xtralife = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1371,13 +1357,6 @@ void P_SpawnShieldOrb(player_t *player)
|
|||
case SH_THUNDERCOIN:
|
||||
orbtype = MT_THUNDERCOIN_ORB;
|
||||
break;
|
||||
case SH_FIREFLOWER:
|
||||
if (!(player->powers[pw_super] || (mariomode && player->powers[pw_invulnerability])))
|
||||
{
|
||||
player->mo->color = SKINCOLOR_WHITE;
|
||||
G_GhostAddColor(GHC_FIREFLOWER);
|
||||
}
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
@ -1440,33 +1419,18 @@ void P_SpawnShieldOrb(player_t *player)
|
|||
// the non-stack layer of shields thoroughly,
|
||||
// then adds the desired one.
|
||||
//
|
||||
// Returns whether to play a normal sound or an itemup.
|
||||
//
|
||||
boolean P_SwitchShield(player_t *player, UINT16 shieldtype)
|
||||
void P_SwitchShield(player_t *player, UINT16 shieldtype)
|
||||
{
|
||||
boolean donthavealready = (shieldtype & SH_FORCE)
|
||||
? (!(player->powers[pw_shield] & SH_FORCE) || (player->powers[pw_shield] & SH_FORCEHP) < (shieldtype & ~SH_FORCE))
|
||||
: ((player->powers[pw_shield] & SH_NOSTACK) != shieldtype);
|
||||
|
||||
if (mariomode)
|
||||
{
|
||||
mobj_t *scoremobj = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + (player->mo->height / 2), MT_SCORE);
|
||||
P_SetMobjState(scoremobj, mobjinfo[MT_SCORE].spawnstate+3); // 1000
|
||||
P_AddPlayerScore(player, 1000);
|
||||
}
|
||||
|
||||
if (donthavealready)
|
||||
{
|
||||
boolean stopshieldability = (shieldtype & SH_FORCE)
|
||||
? (!(player->powers[pw_shield] & SH_FORCE))
|
||||
: true;
|
||||
|
||||
if (mariomode)
|
||||
{
|
||||
player->mo->movecount = player->powers[pw_shield];
|
||||
player->powers[pw_marioflashing] = MARIOFLASHINGTICS;
|
||||
}
|
||||
|
||||
// Just in case.
|
||||
if (stopshieldability && player->pflags & PF_SHIELDABILITY)
|
||||
{
|
||||
|
@ -1474,14 +1438,7 @@ boolean P_SwitchShield(player_t *player, UINT16 shieldtype)
|
|||
player->homing = 0;
|
||||
}
|
||||
|
||||
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_FIREFLOWER // it's implicit that the new shield isn't a fireflower
|
||||
&& !(player->powers[pw_super] || (mariomode && player->powers[pw_invulnerability])))
|
||||
{
|
||||
player->mo->color = player->skincolor;
|
||||
G_GhostAddColor(GHC_NORMAL);
|
||||
}
|
||||
|
||||
player->powers[pw_shield] = shieldtype|(mariomode ? SH_MUSHROOM : player->powers[pw_shield] & SH_STACK);
|
||||
player->powers[pw_shield] = shieldtype|(player->powers[pw_shield] & SH_STACK);
|
||||
P_SpawnShieldOrb(player);
|
||||
|
||||
if (shieldtype & SH_PROTECTWATER)
|
||||
|
@ -1497,9 +1454,7 @@ boolean P_SwitchShield(player_t *player, UINT16 shieldtype)
|
|||
P_RestoreMusic(player);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return (!mariomode);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -2203,7 +2158,7 @@ static void P_CheckInvincibilityTimer(player_t *player)
|
|||
{
|
||||
if (mariomode)
|
||||
{
|
||||
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_FIREFLOWER)
|
||||
if ((player->powers[pw_shield] & SH_STACK) == SH_FIREFLOWER)
|
||||
{
|
||||
player->mo->color = SKINCOLOR_WHITE;
|
||||
G_GhostAddColor(GHC_FIREFLOWER);
|
||||
|
@ -3227,7 +3182,7 @@ static void P_DoFiring(player_t *player, ticcmd_t *cmd)
|
|||
|
||||
if (cmd->buttons & BT_ATTACK || cmd->buttons & BT_FIRENORMAL)
|
||||
{
|
||||
if (!(player->pflags & PF_ATTACKDOWN) && (player->powers[pw_shield] & SH_NOSTACK) == SH_FIREFLOWER && !player->climbing)
|
||||
if (!(player->pflags & PF_ATTACKDOWN) && (player->powers[pw_shield] & SH_STACK) == SH_FIREFLOWER && !player->climbing)
|
||||
{
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
P_SpawnPlayerMissile(player->mo, MT_FIREBALL, 0);
|
||||
|
@ -8594,9 +8549,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
dist = FixedHypot(f1, f2);
|
||||
|
||||
if (mo->eflags & MFE_VERTICALFLIP)
|
||||
angle = R_PointToAngle2(0, thiscam->z + thiscam->height, dist, mo->z + mo->height - (P_GetPlayerHeight(player) << shortmario(player)));
|
||||
angle = R_PointToAngle2(0, thiscam->z + thiscam->height, dist, mo->z + mo->height - P_GetPlayerHeight(player));
|
||||
else
|
||||
angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + (P_GetPlayerHeight(player) << shortmario(player)));
|
||||
angle = R_PointToAngle2(0, thiscam->z, dist, mo->z + P_GetPlayerHeight(player));
|
||||
if (player->playerstate != PST_DEAD)
|
||||
angle += (focusaiming < ANGLE_180 ? focusaiming/2 : InvAngle(InvAngle(focusaiming)/2)); // overcomplicated version of '((signed)focusaiming)/2;'
|
||||
|
||||
|
@ -9335,7 +9290,7 @@ void P_PlayerThink(player_t *player)
|
|||
player->losstime--;
|
||||
|
||||
// Flash player after being hit.
|
||||
if (player->powers[pw_flashing] > 0 && player->powers[pw_flashing] < flashingtics && (leveltime & 1) && !player->powers[pw_marioflashing])
|
||||
if (player->powers[pw_flashing] > 0 && player->powers[pw_flashing] < flashingtics && (leveltime & 1))
|
||||
player->mo->flags2 |= MF2_DONTDRAW;
|
||||
else
|
||||
player->mo->flags2 &= ~MF2_DONTDRAW;
|
||||
|
|
|
@ -1128,8 +1128,6 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
fixed_t offset, offset2;
|
||||
boolean papersprite = !!(thing->frame & FF_PAPERSPRITE);
|
||||
|
||||
fixed_t shortmarioshift = (objectplacing ? 0 : shortmario(thing->player));
|
||||
|
||||
INT32 dispoffset = thing->info->dispoffset;
|
||||
|
||||
//SoM: 3/17/2000
|
||||
|
@ -1364,12 +1362,6 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
return;
|
||||
}
|
||||
|
||||
if (shortmarioshift) // squish mario
|
||||
{
|
||||
yscale >>= shortmarioshift;
|
||||
this_scale >>= shortmarioshift;
|
||||
}
|
||||
|
||||
//SoM: 3/17/2000: Disregard sprites that are out of view..
|
||||
if (vflip)
|
||||
{
|
||||
|
@ -1385,9 +1377,6 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
gz = gzt - FixedMul(spritecachedinfo[lump].height, this_scale);
|
||||
}
|
||||
|
||||
if (shortmarioshift) // unsquish the x component
|
||||
this_scale <<= shortmarioshift;
|
||||
|
||||
if (thing->subsector->sector->cullheight)
|
||||
{
|
||||
if (R_DoCulling(thing->subsector->sector->cullheight, viewsector->cullheight, viewz, gz, gzt))
|
||||
|
@ -1453,7 +1442,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
vis->thingheight = thing->height;
|
||||
vis->pz = thing->z;
|
||||
vis->pzt = vis->pz + vis->thingheight;
|
||||
vis->texturemid = (vis->gzt - viewz) << shortmarioshift;
|
||||
vis->texturemid = vis->gzt - viewz;
|
||||
vis->scalestep = scalestep;
|
||||
|
||||
vis->mobj = thing; // Easy access! Tails 06-07-2002
|
||||
|
|
Loading…
Reference in a new issue