* Super float now back on spin button, again takes precedence over shield actives.

* Fixed BIG mistake where ShieldSpecial hook bailed out of the entire function instead of just the shield section.
This commit is contained in:
toasterbabe 2016-11-24 14:29:29 +00:00
parent 1424c3f6cd
commit 095a438e9e

View file

@ -6947,20 +6947,35 @@ static void P_MovePlayer(player_t *player)
localangle2 = player->mo->angle;
}
///////////////////////////
//BOMB SHIELD ACTIVATION,//
//HOMING, AND OTHER COOL //
//STUFF! //
///////////////////////////
//////////////////
//SHIELD ACTIVES//
//& SUPER FLOAT!//
//////////////////
if (player->pflags & PF_JUMPED && !player->exiting && player->mo->health)
{
if (cmd->buttons & BT_USE) // Spin button effects
{
if (player->powers[pw_super]) // Super can't use shield actives, only passives
{
if ((player->charability == CA_THOK) // Super Sonic float
&& (player->speed > 5*player->mo->scale) // FixedMul(5<<FRACBITS, player->mo->scale), but scale is FRACUNIT-based
&& (P_MobjFlip(player->mo)*player->mo->momz <= 0))
{
if (player->panim == PA_PAIN || player->panim == PA_JUMP || player->panim == PA_FALL
|| (player->panim == PA_WALK && player->mo->state-states != S_PLAY_SUPER_FLOAT))
P_SetPlayerMobjState(player->mo, S_PLAY_SUPER_FLOAT);
player->mo->momz = 0;
player->pflags &= ~PF_SPINNING;
player->jumping = 0; // don't cut jump height after bouncing off something
}
}
else
#ifdef HAVE_BLUA
if (LUAh_ShieldSpecial(player))
return;
if (!LUAh_ShieldSpecial(player))
#endif
{
if (!(player->pflags & (PF_USEDOWN|PF_GLIDING|PF_SLIDING|PF_SHIELDABILITY)) // If the player is not holding down BT_USE, or having used an ability previously
&& (!(player->pflags & PF_THOKKED) || ((player->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP && player->secondjump == UINT8_MAX))) // thokked is optional if you're bubblewrapped
{
@ -7023,20 +7038,6 @@ static void P_MovePlayer(player_t *player)
}
}
}
if ((cmd->buttons & BT_JUMP) && (player->pflags & PF_THOKKED) && !player->homing) // Super Sonic move
{
if ((player->charability == CA_THOK) && player->powers[pw_super] && player->speed > FixedMul(5<<FRACBITS, player->mo->scale)
&& P_MobjFlip(player->mo)*player->mo->momz <= 0)
{
if (player->mo->state-states == S_PLAY_PAIN || player->panim == PA_JUMP || player->panim == PA_FALL
|| (player->panim == PA_WALK && player->mo->state-states != S_PLAY_SUPER_FLOAT))
P_SetPlayerMobjState(player->mo, S_PLAY_SUPER_FLOAT);
player->mo->momz = 0;
player->pflags &= ~(PF_SPINNING|PF_SHIELDABILITY);
player->jumping = 0; // don't cut jump height after bouncing off something
}
}
}