Refinements to flashing.

This commit is contained in:
toasterbabe 2016-10-12 22:06:12 +01:00
parent d4f0afa0d1
commit 71b7db4e0d
2 changed files with 2 additions and 3 deletions

View File

@ -64,7 +64,7 @@
#define mariomode (maptol & TOL_MARIO)
#define shortmario(player) ((player && mariomode && !player->powers[pw_shield]) ? 1 : 0)
#define MARIOFLASHINGTICS 19
#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))

View File

@ -4066,7 +4066,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
if (!mobj->player->powers[pw_nocontrol]++)
mobj->player->powers[pw_nocontrol]++;
if (!(mobj->player->powers[pw_marioflashing] % 4))
if (!((--mobj->player->powers[pw_marioflashing] - 1) % 5))
{
UINT16 shieldswitch = mobj->player->powers[pw_shield];
mobj->player->powers[pw_shield] = mobj->movecount;
@ -4088,7 +4088,6 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
P_SpawnShieldOrb(mobj->player);
}
mobj->player->powers[pw_marioflashing]--;
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]--;