mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-30 22:50:51 +00:00
A_GhostMe lets you change fuse with var1, fixed the walking-spin frames bug For Real This Time
This commit is contained in:
parent
d55f84bec0
commit
6b448f72ee
2 changed files with 45 additions and 39 deletions
|
@ -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
|
||||
|
|
76
src/p_user.c
76
src/p_user.c
|
@ -1801,48 +1801,50 @@ boolean P_PlayerHitFloor(player_t *player)
|
|||
S_StartSound(player->mo, sfx_spin);
|
||||
}
|
||||
else
|
||||
{
|
||||
player->pflags &= ~PF_SPINNING;
|
||||
|
||||
if (player->pflags & PF_GLIDING) // ground gliding
|
||||
{
|
||||
player->skidtime = TICRATE;
|
||||
player->mo->tics = -1;
|
||||
}
|
||||
else if (player->charability2 == CA2_MELEE && (player->panim == PA_ABILITY2 && player->mo->state-states != S_PLAY_MELEE_LANDING))
|
||||
{
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_MELEE_LANDING);
|
||||
player->mo->tics = (player->mo->movefactor == FRACUNIT) ? TICRATE/2 : (FixedDiv(35<<(FRACBITS-1), FixedSqrt(player->mo->movefactor)))>>FRACBITS;
|
||||
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))
|
||||
{
|
||||
if (player->cmomx || player->cmomy)
|
||||
if (player->pflags & PF_GLIDING) // ground gliding
|
||||
{
|
||||
if (player->charflags & SF_DASHMODE && player->dashmode >= 3*TICRATE && player->panim != PA_DASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
|
||||
else if (player->speed >= FixedMul(player->runspeed, player->mo->scale)
|
||||
&& (player->panim != PA_RUN || player->mo->state-states == S_PLAY_FLOAT_RUN))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RUN);
|
||||
else if ((player->rmomx || player->rmomy)
|
||||
&& (player->panim != PA_WALK || player->mo->state-states == S_PLAY_FLOAT))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||
else if (!player->rmomx && !player->rmomy && player->panim != PA_IDLE)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||
player->skidtime = TICRATE;
|
||||
player->mo->tics = -1;
|
||||
}
|
||||
else
|
||||
else if (player->charability2 == CA2_MELEE && (player->panim == PA_ABILITY2 && player->mo->state-states != S_PLAY_MELEE_LANDING))
|
||||
{
|
||||
if (player->charflags & SF_DASHMODE && player->dashmode >= 3*TICRATE && player->panim != PA_DASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
|
||||
else if (player->speed >= FixedMul(player->runspeed, player->mo->scale)
|
||||
&& (player->panim != PA_RUN || player->mo->state-states == S_PLAY_FLOAT_RUN))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RUN);
|
||||
else if ((player->mo->momx || player->mo->momy)
|
||||
&& (player->panim != PA_WALK || player->mo->state-states == S_PLAY_FLOAT))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||
else if (!player->mo->momx && !player->mo->momy && player->panim != PA_IDLE)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_MELEE_LANDING);
|
||||
player->mo->tics = (player->mo->movefactor == FRACUNIT) ? TICRATE/2 : (FixedDiv(35<<(FRACBITS-1), FixedSqrt(player->mo->movefactor)))>>FRACBITS;
|
||||
S_StartSound(player->mo, sfx_s3k8b);
|
||||
player->pflags |= PF_FULLSTASIS;
|
||||
}
|
||||
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)
|
||||
{
|
||||
if (player->charflags & SF_DASHMODE && player->dashmode >= 3*TICRATE && player->panim != PA_DASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
|
||||
else if (player->speed >= FixedMul(player->runspeed, player->mo->scale)
|
||||
&& (player->panim != PA_RUN || player->mo->state-states == S_PLAY_FLOAT_RUN))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RUN);
|
||||
else if ((player->rmomx || player->rmomy)
|
||||
&& (player->panim != PA_WALK || player->mo->state-states == S_PLAY_FLOAT))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||
else if (!player->rmomx && !player->rmomy && player->panim != PA_IDLE)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->charflags & SF_DASHMODE && player->dashmode >= 3*TICRATE && player->panim != PA_DASH)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
|
||||
else if (player->speed >= FixedMul(player->runspeed, player->mo->scale)
|
||||
&& (player->panim != PA_RUN || player->mo->state-states == S_PLAY_FLOAT_RUN))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_RUN);
|
||||
else if ((player->mo->momx || player->mo->momy)
|
||||
&& (player->panim != PA_WALK || player->mo->state-states == S_PLAY_FLOAT))
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||
else if (!player->mo->momx && !player->mo->momy && player->panim != PA_IDLE)
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue