mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Made jump damage flag application less hacky.
This commit is contained in:
parent
98095292d6
commit
99f13c88ae
7 changed files with 80 additions and 80 deletions
|
@ -154,8 +154,8 @@ typedef enum
|
||||||
// Used shield ability
|
// Used shield ability
|
||||||
PF_SHIELDABILITY = 1<<28,
|
PF_SHIELDABILITY = 1<<28,
|
||||||
|
|
||||||
// Force jump damage?
|
// Jump damage?
|
||||||
PF_FORCEJUMPDAMAGE = 1<<29,
|
PF_NOJUMPDAMAGE = 1<<29,
|
||||||
|
|
||||||
// Bouncing
|
// Bouncing
|
||||||
PF_BOUNCING = 1<<30
|
PF_BOUNCING = 1<<30
|
||||||
|
|
|
@ -6971,7 +6971,7 @@ static const char *const PLAYERFLAG_LIST[] = {
|
||||||
"ANALOGMODE", // Analog mode?
|
"ANALOGMODE", // Analog mode?
|
||||||
"CANCARRY", // Can carry?
|
"CANCARRY", // Can carry?
|
||||||
"SHIELDABILITY", // Thokked with shield ability
|
"SHIELDABILITY", // Thokked with shield ability
|
||||||
"FORCEJUMPDAMAGE", // Force jump damage
|
"NOJUMPDAMAGE", // No jump damage
|
||||||
"BOUNCING",
|
"BOUNCING",
|
||||||
|
|
||||||
NULL // stop loop here.
|
NULL // stop loop here.
|
||||||
|
|
|
@ -368,7 +368,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((player->powers[pw_carry] == CR_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
if (((player->powers[pw_carry] == CR_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
||||||
|| ((player->pflags & PF_JUMPED) && (player->pflags & PF_FORCEJUMPDAMAGE || !(player->charflags & SF_NOJUMPSPIN) || (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY)))
|
|| ((player->pflags & PF_JUMPED) && (!(player->pflags & PF_NOJUMPDAMAGE) || (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY)))
|
||||||
|| (player->pflags & (PF_SPINNING|PF_GLIDING))
|
|| (player->pflags & (PF_SPINNING|PF_GLIDING))
|
||||||
|| (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)
|
|| (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)
|
||||||
|| ((player->charflags & SF_STOMPDAMAGE || player->pflags & PF_BOUNCING) && (P_MobjFlip(toucher)*(toucher->z - (special->z + special->height/2)) > 0) && (P_MobjFlip(toucher)*toucher->momz < 0))
|
|| ((player->charflags & SF_STOMPDAMAGE || player->pflags & PF_BOUNCING) && (P_MobjFlip(toucher)*(toucher->z - (special->z + special->height/2)) > 0) && (P_MobjFlip(toucher)*toucher->momz < 0))
|
||||||
|
@ -427,7 +427,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
P_DamageMobj(toucher, special, special, 1, 0);
|
P_DamageMobj(toucher, special, special, 1, 0);
|
||||||
}
|
}
|
||||||
else if (((player->powers[pw_carry] == CR_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
else if (((player->powers[pw_carry] == CR_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
||||||
|| ((player->pflags & PF_JUMPED) && (player->pflags & PF_FORCEJUMPDAMAGE || !(player->charflags & SF_NOJUMPSPIN) || (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY)))
|
|| ((player->pflags & PF_JUMPED) && (!(player->pflags & PF_NOJUMPDAMAGE) || (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY)))
|
||||||
|| (player->pflags & (PF_SPINNING|PF_GLIDING))
|
|| (player->pflags & (PF_SPINNING|PF_GLIDING))
|
||||||
|| (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)
|
|| (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2)
|
||||||
|| ((player->charflags & SF_STOMPDAMAGE || player->pflags & PF_BOUNCING) && (P_MobjFlip(toucher)*(toucher->z - (special->z + special->height/2)) > 0) && (P_MobjFlip(toucher)*toucher->momz < 0))
|
|| ((player->charflags & SF_STOMPDAMAGE || player->pflags & PF_BOUNCING) && (P_MobjFlip(toucher)*(toucher->z - (special->z + special->height/2)) > 0) && (P_MobjFlip(toucher)*toucher->momz < 0))
|
||||||
|
@ -1345,7 +1345,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
toucher->momz = -toucher->momz;
|
toucher->momz = -toucher->momz;
|
||||||
if (player->pflags & PF_GLIDING)
|
if (player->pflags & PF_GLIDING)
|
||||||
{
|
{
|
||||||
player->pflags &= ~(PF_GLIDING|PF_JUMPED);
|
player->pflags &= ~(PF_GLIDING|PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||||
P_SetPlayerMobjState(toucher, S_PLAY_FALL);
|
P_SetPlayerMobjState(toucher, S_PLAY_FALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1405,7 +1405,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
toucher->momz = -toucher->momz;
|
toucher->momz = -toucher->momz;
|
||||||
if (player->pflags & PF_GLIDING)
|
if (player->pflags & PF_GLIDING)
|
||||||
{
|
{
|
||||||
player->pflags &= ~(PF_GLIDING|PF_JUMPED);
|
player->pflags &= ~(PF_GLIDING|PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||||
P_SetPlayerMobjState(toucher, S_PLAY_FALL);
|
P_SetPlayerMobjState(toucher, S_PLAY_FALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1414,7 +1414,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (((player->powers[pw_carry] == CR_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
else if (((player->powers[pw_carry] == CR_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|
||||||
|| ((player->pflags & PF_JUMPED) && (player->pflags & PF_FORCEJUMPDAMAGE || !(player->charflags & SF_NOJUMPSPIN) || (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY)))
|
|| ((player->pflags & PF_JUMPED) && (!(player->pflags & PF_NOJUMPDAMAGE) || (player->charability == CA_TWINSPIN && player->panim == PA_ABILITY)))
|
||||||
|| ((player->charflags & SF_STOMPDAMAGE || player->pflags & PF_BOUNCING) && (P_MobjFlip(toucher)*(toucher->z - (special->z + special->height/2)) > 0) && (P_MobjFlip(toucher)*toucher->momz < 0))
|
|| ((player->charflags & SF_STOMPDAMAGE || player->pflags & PF_BOUNCING) && (P_MobjFlip(toucher)*(toucher->z - (special->z + special->height/2)) > 0) && (P_MobjFlip(toucher)*toucher->momz < 0))
|
||||||
|| (player->pflags & (PF_SPINNING|PF_GLIDING))
|
|| (player->pflags & (PF_SPINNING|PF_GLIDING))
|
||||||
|| player->powers[pw_invulnerability] || player->powers[pw_super]) // Do you possess the ability to subdue the object?
|
|| player->powers[pw_invulnerability] || player->powers[pw_super]) // Do you possess the ability to subdue the object?
|
||||||
|
|
14
src/p_map.c
14
src/p_map.c
|
@ -203,14 +203,14 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pflags = object->player->pflags & (PF_JUMPED|PF_SPINNING|PF_THOKKED|PF_SHIELDABILITY|PF_BOUNCING); // I still need these.
|
pflags = object->player->pflags & (PF_JUMPED|PF_NOJUMPDAMAGE|PF_SPINNING|PF_THOKKED|PF_SHIELDABILITY|PF_BOUNCING); // I still need these.
|
||||||
jumping = object->player->jumping;
|
jumping = object->player->jumping;
|
||||||
secondjump = object->player->secondjump;
|
secondjump = object->player->secondjump;
|
||||||
P_ResetPlayer(object->player);
|
P_ResetPlayer(object->player);
|
||||||
|
|
||||||
if (spring->info->painchance)
|
if (spring->info->painchance)
|
||||||
{
|
{
|
||||||
object->player->pflags |= PF_JUMPED;
|
object->player->pflags |= (PF_JUMPED|((object->player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
P_SetPlayerMobjState(object, S_PLAY_JUMP);
|
P_SetPlayerMobjState(object, S_PLAY_JUMP);
|
||||||
}
|
}
|
||||||
else if (!vertispeed || (pflags & PF_BOUNCING)) // horizontal spring or bouncing
|
else if (!vertispeed || (pflags & PF_BOUNCING)) // horizontal spring or bouncing
|
||||||
|
@ -784,7 +784,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
{
|
{
|
||||||
// Hop on the missile for a ride!
|
// Hop on the missile for a ride!
|
||||||
thing->player->powers[pw_carry] = CR_GENERIC;
|
thing->player->powers[pw_carry] = CR_GENERIC;
|
||||||
thing->player->pflags &= ~PF_JUMPED;
|
thing->player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||||
P_SetTarget(&thing->tracer, tmthing);
|
P_SetTarget(&thing->tracer, tmthing);
|
||||||
P_SetTarget(&tmthing->target, thing); // Set owner to the player
|
P_SetTarget(&tmthing->target, thing); // Set owner to the player
|
||||||
P_SetTarget(&tmthing->tracer, NULL); // Disable homing-ness
|
P_SetTarget(&tmthing->tracer, NULL); // Disable homing-ness
|
||||||
|
@ -1065,8 +1065,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
if (thing->flags & MF_MONITOR
|
if (thing->flags & MF_MONITOR
|
||||||
&& (tmthing->player->pflags & (PF_SPINNING|PF_GLIDING)
|
&& (tmthing->player->pflags & (PF_SPINNING|PF_GLIDING)
|
||||||
|| ((tmthing->player->pflags & PF_JUMPED)
|
|| ((tmthing->player->pflags & PF_JUMPED)
|
||||||
&& (tmthing->player->pflags & PF_FORCEJUMPDAMAGE
|
&& (!(tmthing->player->pflags & PF_NOJUMPDAMAGE)
|
||||||
|| !(tmthing->player->charflags & SF_NOJUMPSPIN)
|
|
||||||
|| (tmthing->player->charability == CA_TWINSPIN && tmthing->player->panim == PA_ABILITY)))
|
|| (tmthing->player->charability == CA_TWINSPIN && tmthing->player->panim == PA_ABILITY)))
|
||||||
|| (tmthing->player->charability2 == CA2_MELEE && tmthing->player->panim == PA_ABILITY2)
|
|| (tmthing->player->charability2 == CA2_MELEE && tmthing->player->panim == PA_ABILITY2)
|
||||||
|| ((tmthing->player->charflags & SF_STOMPDAMAGE || tmthing->player->pflags & PF_BOUNCING)
|
|| ((tmthing->player->charflags & SF_STOMPDAMAGE || tmthing->player->pflags & PF_BOUNCING)
|
||||||
|
@ -1111,8 +1110,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
else if (thing->flags & MF_MONITOR && tmthing->player
|
else if (thing->flags & MF_MONITOR && tmthing->player
|
||||||
&& (tmthing->player->pflags & (PF_SPINNING|PF_GLIDING)
|
&& (tmthing->player->pflags & (PF_SPINNING|PF_GLIDING)
|
||||||
|| ((tmthing->player->pflags & PF_JUMPED)
|
|| ((tmthing->player->pflags & PF_JUMPED)
|
||||||
&& (tmthing->player->pflags & PF_FORCEJUMPDAMAGE
|
&& (!(tmthing->player->pflags & PF_NOJUMPDAMAGE)
|
||||||
|| !(tmthing->player->charflags & SF_NOJUMPSPIN)
|
|
||||||
|| (tmthing->player->charability == CA_TWINSPIN && tmthing->player->panim == PA_ABILITY)))
|
|| (tmthing->player->charability == CA_TWINSPIN && tmthing->player->panim == PA_ABILITY)))
|
||||||
|| (tmthing->player->charability2 == CA2_MELEE && tmthing->player->panim == PA_ABILITY2)
|
|| (tmthing->player->charability2 == CA2_MELEE && tmthing->player->panim == PA_ABILITY2)
|
||||||
|| ((tmthing->player->charflags & SF_STOMPDAMAGE || tmthing->player->pflags & PF_BOUNCING)
|
|| ((tmthing->player->charflags & SF_STOMPDAMAGE || tmthing->player->pflags & PF_BOUNCING)
|
||||||
|
@ -2896,7 +2894,7 @@ isblocking:
|
||||||
slidemo->player->climbing = 5;
|
slidemo->player->climbing = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
slidemo->player->pflags &= ~(PF_GLIDING|PF_SPINNING|PF_JUMPED|PF_THOKKED);
|
slidemo->player->pflags &= ~(PF_GLIDING|PF_SPINNING|PF_JUMPED|PF_NOJUMPDAMAGE|PF_THOKKED);
|
||||||
slidemo->player->glidetime = 0;
|
slidemo->player->glidetime = 0;
|
||||||
slidemo->player->secondjump = 0;
|
slidemo->player->secondjump = 0;
|
||||||
|
|
||||||
|
|
|
@ -3252,7 +3252,7 @@ static void P_PlayerZMovement(mobj_t *mo)
|
||||||
mo->player->pflags &= ~PF_SPINNING;
|
mo->player->pflags &= ~PF_SPINNING;
|
||||||
|
|
||||||
if (!(mo->player->pflags & PF_GLIDING))
|
if (!(mo->player->pflags & PF_GLIDING))
|
||||||
mo->player->pflags &= ~(PF_JUMPED|PF_FORCEJUMPDAMAGE);
|
mo->player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||||
|
|
||||||
mo->player->pflags &= ~(PF_THOKKED|PF_CANCARRY/*|PF_GLIDING*/);
|
mo->player->pflags &= ~(PF_THOKKED|PF_CANCARRY/*|PF_GLIDING*/);
|
||||||
mo->player->jumping = 0;
|
mo->player->jumping = 0;
|
||||||
|
@ -4246,7 +4246,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
|
||||||
{
|
{
|
||||||
if (!(mobj->player->powers[pw_carry] == CR_NIGHTSMODE)) // "jumping" is used for drilling
|
if (!(mobj->player->powers[pw_carry] == CR_NIGHTSMODE)) // "jumping" is used for drilling
|
||||||
mobj->player->jumping = 0;
|
mobj->player->jumping = 0;
|
||||||
mobj->player->pflags &= ~PF_JUMPED;
|
mobj->player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||||
if (mobj->player->secondjump || mobj->player->powers[pw_tailsfly])
|
if (mobj->player->secondjump || mobj->player->powers[pw_tailsfly])
|
||||||
{
|
{
|
||||||
mobj->player->secondjump = 0;
|
mobj->player->secondjump = 0;
|
||||||
|
|
10
src/p_spec.c
10
src/p_spec.c
|
@ -4030,7 +4030,7 @@ DoneSection2:
|
||||||
player->powers[pw_carry] = CR_ZOOMTUBE;
|
player->powers[pw_carry] = CR_ZOOMTUBE;
|
||||||
player->speed = speed;
|
player->speed = speed;
|
||||||
player->pflags |= PF_SPINNING;
|
player->pflags |= PF_SPINNING;
|
||||||
player->pflags &= ~(PF_JUMPED|PF_GLIDING|PF_SLIDING|PF_CANCARRY);
|
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE|PF_GLIDING|PF_SLIDING|PF_CANCARRY);
|
||||||
player->climbing = 0;
|
player->climbing = 0;
|
||||||
|
|
||||||
if (player->mo->state-states != S_PLAY_ROLL)
|
if (player->mo->state-states != S_PLAY_ROLL)
|
||||||
|
@ -4110,7 +4110,7 @@ DoneSection2:
|
||||||
player->powers[pw_carry] = CR_ZOOMTUBE;
|
player->powers[pw_carry] = CR_ZOOMTUBE;
|
||||||
player->speed = speed;
|
player->speed = speed;
|
||||||
player->pflags |= PF_SPINNING;
|
player->pflags |= PF_SPINNING;
|
||||||
player->pflags &= ~(PF_JUMPED|PF_GLIDING|PF_SLIDING|PF_CANCARRY);
|
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE|PF_GLIDING|PF_SLIDING|PF_CANCARRY);
|
||||||
player->climbing = 0;
|
player->climbing = 0;
|
||||||
|
|
||||||
if (player->mo->state-states != S_PLAY_ROLL)
|
if (player->mo->state-states != S_PLAY_ROLL)
|
||||||
|
@ -4418,7 +4418,7 @@ DoneSection2:
|
||||||
|
|
||||||
S_StartSound(player->mo, sfx_s3k4a);
|
S_StartSound(player->mo, sfx_s3k4a);
|
||||||
|
|
||||||
player->pflags &= ~(PF_JUMPED|PF_GLIDING|PF_SLIDING|PF_CANCARRY);
|
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE|PF_GLIDING|PF_SLIDING|PF_CANCARRY);
|
||||||
player->climbing = 0;
|
player->climbing = 0;
|
||||||
P_SetThingPosition(player->mo);
|
P_SetThingPosition(player->mo);
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_RIDE);
|
P_SetPlayerMobjState(player->mo, S_PLAY_RIDE);
|
||||||
|
@ -7661,11 +7661,11 @@ void T_Pusher(pusher_t *p)
|
||||||
{
|
{
|
||||||
if (p->slider && thing->player)
|
if (p->slider && thing->player)
|
||||||
{
|
{
|
||||||
boolean jumped = (thing->player->pflags & PF_JUMPED);
|
pflags_t jumped = (thing->player->pflags & (PF_JUMPED|PF_NOJUMPDAMAGE));
|
||||||
P_ResetPlayer (thing->player);
|
P_ResetPlayer (thing->player);
|
||||||
|
|
||||||
if (jumped)
|
if (jumped)
|
||||||
thing->player->pflags |= PF_JUMPED;
|
thing->player->pflags |= jumped;
|
||||||
|
|
||||||
thing->player->pflags |= PF_SLIDING;
|
thing->player->pflags |= PF_SLIDING;
|
||||||
P_SetPlayerMobjState (thing, thing->info->painstate); // Whee!
|
P_SetPlayerMobjState (thing, thing->info->painstate); // Whee!
|
||||||
|
|
116
src/p_user.c
116
src/p_user.c
|
@ -577,7 +577,7 @@ static void P_DeNightserizePlayer(player_t *player)
|
||||||
player->powers[pw_carry] = CR_NONE;
|
player->powers[pw_carry] = CR_NONE;
|
||||||
|
|
||||||
player->powers[pw_underwater] = 0;
|
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_NOJUMPDAMAGE|PF_THOKKED|PF_SPINNING|PF_DRILLING|PF_TRANSFERTOCLOSEST);
|
||||||
player->secondjump = 0;
|
player->secondjump = 0;
|
||||||
player->jumping = 0;
|
player->jumping = 0;
|
||||||
player->homing = 0;
|
player->homing = 0;
|
||||||
|
@ -650,7 +650,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
||||||
if (player->powers[pw_carry] != CR_NIGHTSMODE)
|
if (player->powers[pw_carry] != CR_NIGHTSMODE)
|
||||||
player->mo->height = P_GetPlayerHeight(player); // Just to make sure jumping into the drone doesn't result in a squashed hitbox.
|
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_NOJUMPDAMAGE|PF_THOKKED|PF_SHIELDABILITY|PF_SPINNING|PF_DRILLING);
|
||||||
player->homing = 0;
|
player->homing = 0;
|
||||||
player->mo->fuse = 0;
|
player->mo->fuse = 0;
|
||||||
player->speed = 0;
|
player->speed = 0;
|
||||||
|
@ -871,7 +871,7 @@ void P_DoPlayerPain(player_t *player, mobj_t *source, mobj_t *inflictor)
|
||||||
// Useful when you want to kill everything the player is doing.
|
// Useful when you want to kill everything the player is doing.
|
||||||
void P_ResetPlayer(player_t *player)
|
void P_ResetPlayer(player_t *player)
|
||||||
{
|
{
|
||||||
player->pflags &= ~(PF_SPINNING|PF_STARTDASH|PF_JUMPED|PF_FORCEJUMPDAMAGE|PF_GLIDING|PF_THOKKED|PF_CANCARRY|PF_SHIELDABILITY|PF_BOUNCING);
|
player->pflags &= ~(PF_SPINNING|PF_STARTDASH|PF_JUMPED|PF_NOJUMPDAMAGE|PF_GLIDING|PF_THOKKED|PF_CANCARRY|PF_SHIELDABILITY|PF_BOUNCING);
|
||||||
|
|
||||||
if (!(player->powers[pw_carry] == CR_NIGHTSMODE || player->powers[pw_carry] == CR_BRAKGOOP))
|
if (!(player->powers[pw_carry] == CR_NIGHTSMODE || player->powers[pw_carry] == CR_BRAKGOOP))
|
||||||
player->powers[pw_carry] = CR_NONE;
|
player->powers[pw_carry] = CR_NONE;
|
||||||
|
@ -1670,7 +1670,7 @@ void P_DoPlayerExit(player_t *player)
|
||||||
if (player->climbing)
|
if (player->climbing)
|
||||||
{
|
{
|
||||||
player->climbing = 0;
|
player->climbing = 0;
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
}
|
}
|
||||||
player->powers[pw_underwater] = 0;
|
player->powers[pw_underwater] = 0;
|
||||||
|
@ -2005,7 +2005,7 @@ static void P_CheckBouncySectors(player_t *player)
|
||||||
if (player->pflags & PF_SPINNING)
|
if (player->pflags & PF_SPINNING)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_SPINNING;
|
player->pflags &= ~PF_SPINNING;
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
player->pflags |= PF_THOKKED;
|
player->pflags |= PF_THOKKED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2017,7 +2017,7 @@ static void P_CheckBouncySectors(player_t *player)
|
||||||
if (player->pflags & PF_SPINNING)
|
if (player->pflags & PF_SPINNING)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_SPINNING;
|
player->pflags &= ~PF_SPINNING;
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
player->pflags |= PF_THOKKED;
|
player->pflags |= PF_THOKKED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2025,7 +2025,7 @@ static void P_CheckBouncySectors(player_t *player)
|
||||||
if ((player->pflags & PF_SPINNING) && player->speed < FixedMul(1<<FRACBITS, player->mo->scale) && player->mo->momz)
|
if ((player->pflags & PF_SPINNING) && player->speed < FixedMul(1<<FRACBITS, player->mo->scale) && player->mo->momz)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_SPINNING;
|
player->pflags &= ~PF_SPINNING;
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
goto bouncydone;
|
goto bouncydone;
|
||||||
|
@ -2767,21 +2767,21 @@ static void P_DoClimbing(player_t *player)
|
||||||
P_InstaThrust(player->mo, player->mo->angle, FixedMul(4*FRACUNIT, player->mo->scale)); // Lil' boost up.
|
P_InstaThrust(player->mo, player->mo->angle, FixedMul(4*FRACUNIT, player->mo->scale)); // Lil' boost up.
|
||||||
|
|
||||||
player->climbing = 0;
|
player->climbing = 0;
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skyclimber)
|
if (skyclimber)
|
||||||
{
|
{
|
||||||
player->climbing = 0;
|
player->climbing = 0;
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->climbing = 0;
|
player->climbing = 0;
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2799,7 +2799,7 @@ static void P_DoClimbing(player_t *player)
|
||||||
if (cmd->buttons & BT_USE && !(player->pflags & PF_JUMPSTASIS))
|
if (cmd->buttons & BT_USE && !(player->pflags & PF_JUMPSTASIS))
|
||||||
{
|
{
|
||||||
player->climbing = 0;
|
player->climbing = 0;
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
P_SetObjectMomZ(player->mo, 4*FRACUNIT, false);
|
P_SetObjectMomZ(player->mo, 4*FRACUNIT, false);
|
||||||
P_InstaThrust(player->mo, player->mo->angle, FixedMul(-4*FRACUNIT, player->mo->scale));
|
P_InstaThrust(player->mo, player->mo->angle, FixedMul(-4*FRACUNIT, player->mo->scale));
|
||||||
|
@ -3595,7 +3595,7 @@ void P_DoJump(player_t *player, boolean soundandstate)
|
||||||
else if (player->mo->momz < 0) // still descending?
|
else if (player->mo->momz < 0) // still descending?
|
||||||
player->mo->momz = (39*(FRACUNIT/4))>>1; // just default to the jump height.
|
player->mo->momz = (39*(FRACUNIT/4))>>1; // just default to the jump height.
|
||||||
}
|
}
|
||||||
else if (!(player->pflags & PF_JUMPED)) // Spin Attack
|
else if (!(player->pflags & PF_JUMPED)) // Jump
|
||||||
{
|
{
|
||||||
if (player->mo->ceilingz-player->mo->floorz <= player->mo->height-1)
|
if (player->mo->ceilingz-player->mo->floorz <= player->mo->height-1)
|
||||||
return;
|
return;
|
||||||
|
@ -3695,7 +3695,7 @@ void P_DoJump(player_t *player, boolean soundandstate)
|
||||||
}
|
}
|
||||||
player->mo->eflags &= ~MFE_APPLYPMOMZ;
|
player->mo->eflags &= ~MFE_APPLYPMOMZ;
|
||||||
|
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));;
|
||||||
|
|
||||||
if (soundandstate)
|
if (soundandstate)
|
||||||
{
|
{
|
||||||
|
@ -3930,7 +3930,7 @@ void P_DoJumpShield(player_t *player)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_JUMPED;
|
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
||||||
S_StartSound(player->mo, sfx_wdjump);
|
S_StartSound(player->mo, sfx_wdjump);
|
||||||
}
|
}
|
||||||
|
@ -3943,7 +3943,7 @@ void P_DoJumpShield(player_t *player)
|
||||||
//
|
//
|
||||||
void P_DoBubbleBounce(player_t *player)
|
void P_DoBubbleBounce(player_t *player)
|
||||||
{
|
{
|
||||||
player->pflags &= ~(PF_JUMPED|PF_SHIELDABILITY);
|
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE|PF_SHIELDABILITY);
|
||||||
S_StartSound(player->mo, sfx_s3k44);
|
S_StartSound(player->mo, sfx_s3k44);
|
||||||
P_DoJump(player, false);
|
P_DoJump(player, false);
|
||||||
if (player->charflags & SF_NOJUMPSPIN)
|
if (player->charflags & SF_NOJUMPSPIN)
|
||||||
|
@ -4218,7 +4218,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
player->powers[pw_tailsfly] = tailsflytics + 1; // Set the fly timer
|
player->powers[pw_tailsfly] = tailsflytics + 1; // Set the fly timer
|
||||||
|
|
||||||
player->pflags &= ~(PF_JUMPED|PF_SPINNING|PF_STARTDASH);
|
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE|PF_SPINNING|PF_STARTDASH);
|
||||||
player->pflags |= (PF_THOKKED|PF_CANCARRY);
|
player->pflags |= (PF_THOKKED|PF_CANCARRY);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4256,7 +4256,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
else
|
else
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_FLOAT);
|
P_SetPlayerMobjState(player->mo, S_PLAY_FLOAT);
|
||||||
player->pflags |= PF_THOKKED;
|
player->pflags |= PF_THOKKED;
|
||||||
player->pflags &= ~(PF_JUMPED|PF_SPINNING);
|
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE|PF_SPINNING);
|
||||||
player->secondjump = 1;
|
player->secondjump = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -4288,7 +4288,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
if (!(player->pflags & PF_THOKKED) || player->charability2 == CA2_MULTIABILITY)
|
if (!(player->pflags & PF_THOKKED) || player->charability2 == CA2_MULTIABILITY)
|
||||||
{
|
{
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_BOUNCE);
|
P_SetPlayerMobjState(player->mo, S_PLAY_BOUNCE);
|
||||||
player->pflags &= ~PF_JUMPED;
|
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||||
player->pflags |= PF_THOKKED|PF_BOUNCING;
|
player->pflags |= PF_THOKKED|PF_BOUNCING;
|
||||||
player->mo->momx >>= 1;
|
player->mo->momx >>= 1;
|
||||||
player->mo->momy >>= 1;
|
player->mo->momy >>= 1;
|
||||||
|
@ -4372,7 +4372,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
||||||
{
|
{
|
||||||
if (player->charability2 == CA2_MULTIABILITY)
|
if (player->charability2 == CA2_MULTIABILITY)
|
||||||
{
|
{
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
player->secondjump = 0;
|
player->secondjump = 0;
|
||||||
}
|
}
|
||||||
|
@ -6439,7 +6439,7 @@ static void P_SkidStuff(player_t *player)
|
||||||
if (!onground)
|
if (!onground)
|
||||||
{
|
{
|
||||||
player->skidtime = 0;
|
player->skidtime = 0;
|
||||||
player->pflags &= ~(PF_GLIDING|PF_JUMPED);
|
player->pflags &= ~(PF_GLIDING|PF_JUMPED|PF_NOJUMPDAMAGE);
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
||||||
}
|
}
|
||||||
// Get up and brush yourself off, idiot.
|
// Get up and brush yourself off, idiot.
|
||||||
|
@ -6758,10 +6758,9 @@ static void P_MovePlayer(player_t *player)
|
||||||
if (onground && player->pflags & PF_JUMPED && !(player->pflags & PF_GLIDING)
|
if (onground && player->pflags & PF_JUMPED && !(player->pflags & PF_GLIDING)
|
||||||
&& P_MobjFlip(player->mo)*player->mo->momz < 0)
|
&& P_MobjFlip(player->mo)*player->mo->momz < 0)
|
||||||
{
|
{
|
||||||
player->pflags &= ~PF_JUMPED;
|
player->pflags &= ~(PF_JUMPED|PF_NOJUMPDAMAGE|PF_THOKKED|PF_SHIELDABILITY);
|
||||||
player->jumping = 0;
|
player->jumping = 0;
|
||||||
player->secondjump = 0;
|
player->secondjump = 0;
|
||||||
player->pflags &= ~PF_THOKKED;
|
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6772,7 +6771,7 @@ static void P_MovePlayer(player_t *player)
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
}
|
}
|
||||||
player->pflags &= ~PF_GLIDING;
|
player->pflags &= ~PF_GLIDING;
|
||||||
|
@ -6787,38 +6786,15 @@ static void P_MovePlayer(player_t *player)
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
}
|
}
|
||||||
player->pflags &= ~PF_BOUNCING;
|
player->pflags &= ~PF_BOUNCING;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bouncing...
|
|
||||||
if (player->pflags & PF_BOUNCING)
|
|
||||||
{
|
|
||||||
if (!(player->pflags & PF_JUMPDOWN) || (onground && P_MobjFlip(player->mo)*player->mo->momz <= 0)) // If not holding the jump button OR on flat ground
|
|
||||||
{
|
|
||||||
P_ResetPlayer(player); // down, stop bouncing.
|
|
||||||
player->pflags |= PF_THOKKED;
|
|
||||||
if (onground)
|
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
|
||||||
else if (player->charability2 == CA2_MULTIABILITY)
|
|
||||||
{
|
|
||||||
player->pflags |= PF_JUMPED;
|
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player->mo->momx >>= 1;
|
|
||||||
player->mo->momy >>= 1;
|
|
||||||
player->mo->momz >>= 1;
|
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Glide MOMZ
|
// Glide MOMZ
|
||||||
// AKA my own gravity. =)
|
// AKA my own gravity. =)
|
||||||
else if (player->pflags & PF_GLIDING)
|
if (player->pflags & PF_GLIDING)
|
||||||
{
|
{
|
||||||
fixed_t leeway;
|
fixed_t leeway;
|
||||||
fixed_t glidespeed = player->actionspd;
|
fixed_t glidespeed = player->actionspd;
|
||||||
|
@ -6864,7 +6840,7 @@ static void P_MovePlayer(player_t *player)
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||||
else if (player->charability2 == CA2_MULTIABILITY)
|
else if (player->charability2 == CA2_MULTIABILITY)
|
||||||
{
|
{
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -6891,6 +6867,30 @@ static void P_MovePlayer(player_t *player)
|
||||||
player->mo->momz = 0;
|
player->mo->momz = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (player->pflags & PF_BOUNCING)
|
||||||
|
{
|
||||||
|
if (!(player->pflags & PF_JUMPDOWN) || (onground && P_MobjFlip(player->mo)*player->mo->momz <= 0)) // If not holding the jump button OR on flat ground
|
||||||
|
{
|
||||||
|
P_ResetPlayer(player); // down, stop bouncing.
|
||||||
|
player->pflags |= PF_THOKKED;
|
||||||
|
if (onground)
|
||||||
|
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||||
|
else if (player->charability2 == CA2_MULTIABILITY)
|
||||||
|
{
|
||||||
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player->mo->momx >>= 1;
|
||||||
|
player->mo->momy >>= 1;
|
||||||
|
player->mo->momz >>= 1;
|
||||||
|
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (player->mo->state-states == S_PLAY_BOUNCE)
|
||||||
|
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
||||||
|
|
||||||
// If you're running fast enough, you can create splashes as you run in shallow water.
|
// If you're running fast enough, you can create splashes as you run in shallow water.
|
||||||
if (!player->climbing
|
if (!player->climbing
|
||||||
|
@ -6934,7 +6934,7 @@ static void P_MovePlayer(player_t *player)
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7158,7 +7158,7 @@ static void P_MovePlayer(player_t *player)
|
||||||
player->homing = 2;
|
player->homing = 2;
|
||||||
if (P_LookForEnemies(player, false) && player->mo->tracer)
|
if (P_LookForEnemies(player, false) && player->mo->tracer)
|
||||||
{
|
{
|
||||||
player->pflags |= PF_FORCEJUMPDAMAGE;
|
player->pflags &= ~PF_NOJUMPDAMAGE;
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||||
S_StartSound(player->mo, sfx_s3k40);
|
S_StartSound(player->mo, sfx_s3k40);
|
||||||
player->homing = 3*TICRATE;
|
player->homing = 3*TICRATE;
|
||||||
|
@ -7169,7 +7169,8 @@ static void P_MovePlayer(player_t *player)
|
||||||
// Elemental/Bubblewrap shield activation
|
// Elemental/Bubblewrap shield activation
|
||||||
case SH_ELEMENTAL:
|
case SH_ELEMENTAL:
|
||||||
case SH_BUBBLEWRAP:
|
case SH_BUBBLEWRAP:
|
||||||
player->pflags |= PF_FORCEJUMPDAMAGE|PF_THOKKED|PF_SHIELDABILITY;
|
player->pflags |= PF_THOKKED|PF_SHIELDABILITY;
|
||||||
|
player->pflags &= ~PF_NOJUMPDAMAGE;
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||||
player->secondjump = 0;
|
player->secondjump = 0;
|
||||||
player->mo->momx = player->mo->momy = 0;
|
player->mo->momx = player->mo->momy = 0;
|
||||||
|
@ -7590,7 +7591,7 @@ static void P_DoRopeHang(player_t *player)
|
||||||
{
|
{
|
||||||
P_SetTarget(&player->mo->tracer, NULL);
|
P_SetTarget(&player->mo->tracer, NULL);
|
||||||
|
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
player->powers[pw_carry] = CR_NONE;
|
player->powers[pw_carry] = CR_NONE;
|
||||||
|
|
||||||
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
|
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
|
||||||
|
@ -7688,7 +7689,7 @@ static void P_DoRopeHang(player_t *player)
|
||||||
{
|
{
|
||||||
if (player->mo->tracer->flags & MF_SLIDEME)
|
if (player->mo->tracer->flags & MF_SLIDEME)
|
||||||
{
|
{
|
||||||
player->pflags |= PF_JUMPED;
|
player->pflags |= (PF_JUMPED|((player->charflags & SF_NOJUMPDAMAGE) ? PF_NOJUMPDAMAGE : 0));
|
||||||
|
|
||||||
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
|
if (!(player->pflags & PF_SLIDING) && (player->pflags & PF_JUMPED)
|
||||||
&& !(player->panim == PA_JUMP))
|
&& !(player->panim == PA_JUMP))
|
||||||
|
@ -9034,11 +9035,11 @@ void P_PlayerThink(player_t *player)
|
||||||
if (player->panim != PA_ABILITY)
|
if (player->panim != PA_ABILITY)
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_GLIDE);
|
P_SetPlayerMobjState(player->mo, S_PLAY_GLIDE);
|
||||||
}
|
}
|
||||||
else if ((player->pflags & PF_JUMPED) && !player->powers[pw_super] && ((player->charflags & SF_NOJUMPSPIN && player->pflags & PF_FORCEJUMPDAMAGE && player->panim != PA_ROLL) || (!(player->charflags & SF_NOJUMPSPIN) && player->panim != PA_JUMP)))
|
else if ((player->pflags & PF_JUMPED) && !player->powers[pw_super] && ((player->charflags & SF_NOJUMPSPIN && player->pflags & PF_NOJUMPDAMAGE && player->panim != PA_ROLL) || (!(player->charflags & SF_NOJUMPSPIN) && player->panim != PA_JUMP)))
|
||||||
{
|
{
|
||||||
if (!(player->charflags & SF_NOJUMPSPIN))
|
if (!(player->charflags & SF_NOJUMPSPIN))
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
|
||||||
else if (player->pflags & PF_FORCEJUMPDAMAGE)
|
else if (!(player->pflags & PF_NOJUMPDAMAGE))
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
P_SetPlayerMobjState(player->mo, S_PLAY_ROLL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9816,7 +9817,8 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
player->mo->momy = (player->mo->tracer->y - player->mo->y)*2;
|
player->mo->momy = (player->mo->tracer->y - player->mo->y)*2;
|
||||||
player->mo->momz = (player->mo->tracer->z - (player->mo->height-player->mo->tracer->height/2) - player->mo->z)*2;
|
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));
|
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|PF_FORCEJUMPDAMAGE;
|
player->pflags |= PF_JUMPED;
|
||||||
|
player->pflags &= ~PF_NOJUMPDAMAGE;
|
||||||
player->secondjump = 0;
|
player->secondjump = 0;
|
||||||
player->pflags &= ~PF_THOKKED;
|
player->pflags &= ~PF_THOKKED;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue