A_GhostMe lets you change fuse with var1, fixed the walking-spin frames bug For Real This Time

This commit is contained in:
TehRealSalt 2017-09-21 17:34:53 -04:00
parent d55f84bec0
commit 6b448f72ee
2 changed files with 45 additions and 39 deletions

View file

@ -7957,16 +7957,20 @@ void A_OrbitNights(mobj_t* actor)
//
// Description: Spawns a "ghost" mobj of this actor, ala spindash trails and the minus's digging "trails"
//
// var1 = unused
// var1 = duration in tics
// var2 = unused
//
void A_GhostMe(mobj_t *actor)
{
INT32 locvar1 = var1;
mobj_t *ghost;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_GhostMe", actor))
return;
#endif
P_SpawnGhostMobj(actor);
ghost = P_SpawnGhostMobj(actor);
if (ghost && locvar1 > 1)
ghost->fuse = locvar1;
}
// Function: A_SetObjectState

View file

@ -1801,6 +1801,7 @@ boolean P_PlayerHitFloor(player_t *player)
S_StartSound(player->mo, sfx_spin);
}
else
{
player->pflags &= ~PF_SPINNING;
if (player->pflags & PF_GLIDING) // ground gliding
@ -1815,8 +1816,8 @@ boolean P_PlayerHitFloor(player_t *player)
S_StartSound(player->mo, sfx_s3k8b);
player->pflags |= PF_FULLSTASIS;
}
else if ((player->pflags & PF_JUMPED || player->powers[pw_tailsfly]
|| player->mo->state-states == S_PLAY_FLY_TIRED) && !(player->pflags & PF_SPINNING))
else if (player->pflags & PF_JUMPED || !(player->pflags & PF_SPINNING)
|| player->powers[pw_tailsfly] || player->mo->state-states == S_PLAY_FLY_TIRED)
{
if (player->cmomx || player->cmomy)
{
@ -1845,6 +1846,7 @@ boolean P_PlayerHitFloor(player_t *player)
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
}
}
}
if (!(player->pflags & PF_GLIDING))
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);