Thorough jumpdamage setting.

This commit is contained in:
toasterbabe 2016-10-23 14:42:37 +01:00
parent 5ad7fc8495
commit 8720252059
3 changed files with 38 additions and 5 deletions

View file

@ -203,7 +203,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
}
}
pflags = object->player->pflags & (PF_JUMPED|PF_SPINNING|PF_THOKKED|PF_SHIELDABILITY); // I still need these.
pflags = object->player->pflags & (PF_JUMPED|PF_JUMPDAMAGE|PF_SPINNING|PF_THOKKED|PF_SHIELDABILITY); // I still need these.
jumping = object->player->jumping;
secondjump = object->player->secondjump;
P_ResetPlayer(object->player);
@ -211,6 +211,8 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
if (spring->info->painchance)
{
object->player->pflags |= PF_JUMPED;
if (!(object->player->charflags & SF_NOJUMPDAMAGE))
object->player->pflags |= PF_JUMPDAMAGE;
P_SetPlayerMobjState(object, S_PLAY_JUMP);
}
else if (P_MobjFlip(object)*vertispeed > 0)

View file

@ -7533,7 +7533,11 @@ void T_Pusher(pusher_t *p)
P_ResetPlayer (thing->player);
if (jumped)
{
thing->player->pflags |= PF_JUMPED;
if (!(thing->player->charflags & SF_NOJUMPDAMAGE))
thing->player->pflags |= PF_JUMPDAMAGE;
}
thing->player->pflags |= PF_SLIDING;
P_SetPlayerMobjState (thing, thing->info->painstate); // Whee!

View file

@ -577,7 +577,7 @@ static void P_DeNightserizePlayer(player_t *player)
player->pflags &= ~PF_NIGHTSMODE;
player->powers[pw_underwater] = 0;
player->pflags &= ~(PF_USEDOWN|PF_JUMPDOWN|PF_ATTACKDOWN|PF_STARTDASH|PF_GLIDING|PF_JUMPED|PF_THOKKED|PF_SPINNING|PF_DRILLING|PF_TRANSFERTOCLOSEST);
player->pflags &= ~(PF_USEDOWN|PF_JUMPDOWN|PF_ATTACKDOWN|PF_STARTDASH|PF_GLIDING|PF_JUMPED|PF_JUMPDAMAGE|PF_THOKKED|PF_SPINNING|PF_DRILLING|PF_TRANSFERTOCLOSEST);
player->secondjump = 0;
player->jumping = 0;
player->homing = 0;
@ -650,7 +650,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
if (!(player->pflags & PF_NIGHTSMODE))
player->mo->height = P_GetPlayerHeight(player); // Just to make sure jumping into the drone doesn't result in a squashed hitbox.
player->pflags &= ~(PF_USEDOWN|PF_JUMPDOWN|PF_ATTACKDOWN|PF_STARTDASH|PF_GLIDING|PF_JUMPED|PF_THOKKED|PF_SHIELDABILITY|PF_SPINNING|PF_DRILLING);
player->pflags &= ~(PF_USEDOWN|PF_JUMPDOWN|PF_ATTACKDOWN|PF_STARTDASH|PF_GLIDING|PF_JUMPED|PF_JUMPDAMAGE|PF_THOKKED|PF_SHIELDABILITY|PF_SPINNING|PF_DRILLING);
player->homing = 0;
player->mo->fuse = 0;
player->speed = 0;
@ -1677,6 +1677,8 @@ void P_DoPlayerExit(player_t *player)
{
player->climbing = 0;
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
}
player->powers[pw_underwater] = 0;
@ -1997,6 +1999,8 @@ static void P_CheckBouncySectors(player_t *player)
{
player->pflags &= ~PF_SPINNING;
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
player->pflags |= PF_THOKKED;
}
}
@ -2008,8 +2012,9 @@ static void P_CheckBouncySectors(player_t *player)
if (player->pflags & PF_SPINNING)
{
player->pflags &= ~PF_SPINNING;
player->pflags |= PF_JUMPED;
player->pflags |= PF_THOKKED;
player->pflags |= (PF_JUMPED|PF_THOKKED);
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
}
}
@ -2017,6 +2022,8 @@ static void P_CheckBouncySectors(player_t *player)
{
player->pflags &= ~PF_SPINNING;
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
}
goto bouncydone;
@ -2760,6 +2767,8 @@ static void P_DoClimbing(player_t *player)
player->climbing = 0;
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
}
@ -2767,6 +2776,8 @@ static void P_DoClimbing(player_t *player)
{
player->climbing = 0;
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
}
}
@ -2774,6 +2785,8 @@ static void P_DoClimbing(player_t *player)
{
player->climbing = 0;
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
}
@ -2792,6 +2805,8 @@ static void P_DoClimbing(player_t *player)
{
player->climbing = 0;
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
P_SetObjectMomZ(player->mo, 4*FRACUNIT, false);
P_InstaThrust(player->mo, player->mo->angle, FixedMul(-4*FRACUNIT, player->mo->scale));
@ -6712,6 +6727,8 @@ static void P_MovePlayer(player_t *player)
else
{
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
}
player->pflags &= ~PF_GLIDING;
@ -6769,6 +6786,8 @@ static void P_MovePlayer(player_t *player)
|| (player->powers[pw_super] && ALL7EMERALDS(player->powers[pw_emeralds]) && player->charability == CA_GLIDEANDCLIMB))
{
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
}
else
@ -6839,6 +6858,8 @@ static void P_MovePlayer(player_t *player)
else
{
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
}
}
@ -7488,6 +7509,8 @@ static void P_DoRopeHang(player_t *player)
P_SetTarget(&player->mo->tracer, NULL);
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
player->powers[pw_carry] = CR_NONE;
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
@ -7586,6 +7609,8 @@ static void P_DoRopeHang(player_t *player)
if (player->mo->tracer->flags & MF_SLIDEME)
{
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
&& !(player->panim == PA_JUMP))
@ -9681,6 +9706,8 @@ void P_PlayerAfterThink(player_t *player)
player->mo->momz = (player->mo->tracer->z - (player->mo->height-player->mo->tracer->height/2) - player->mo->z)*2;
P_TeleportMove(player->mo, player->mo->tracer->x, player->mo->tracer->y, player->mo->tracer->z - (player->mo->height-player->mo->tracer->height/2));
player->pflags |= PF_JUMPED;
if (!(player->charflags & SF_NOJUMPDAMAGE))
player->pflags |= PF_JUMPDAMAGE;
player->secondjump = 0;
player->pflags &= ~PF_THOKKED;