Tweaked the elemental shield's piercing ability. Specifically:
* The spinfire ring is now capable of damaging enemies. (god, what a terrible hack this is) * When ground pounding, you now bounce off the floor a little bit to make the ability less spammable.
This commit is contained in:
parent
34d56561e4
commit
3eb3caacd5
18
src/p_mobj.c
18
src/p_mobj.c
|
@ -2579,11 +2579,15 @@ static boolean P_ZMovement(mobj_t *mo)
|
||||||
P_RemoveMobj(mo);
|
P_RemoveMobj(mo);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (mo->z <= mo->floorz && mo->momz)
|
if (mo->momz
|
||||||
|
&& !(mo->flags & MF_NOGRAVITY)
|
||||||
|
&& ((!(mo->eflags & MFE_VERTICALFLIP) && mo->z <= mo->floorz)
|
||||||
|
|| ((mo->eflags & MFE_VERTICALFLIP) && mo->z+mo->height >= mo->ceilingz)))
|
||||||
{
|
{
|
||||||
mo->flags |= MF_NOGRAVITY;
|
mo->flags |= MF_NOGRAVITY;
|
||||||
mo->momx = mo->momy = mo->momz = 0;
|
mo->momx = 8; // this is a hack which is used to ensure it still behaves as a missile and can damage others
|
||||||
mo->z = mo->floorz;
|
mo->momy = mo->momz = 0;
|
||||||
|
mo->z = ((mo->eflags & MFE_VERTICALFLIP) ? mo->ceilingz-mo->height : mo->floorz);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MT_GOOP:
|
case MT_GOOP:
|
||||||
|
@ -3071,6 +3075,8 @@ static void P_PlayerZMovement(mobj_t *mo)
|
||||||
|
|
||||||
if (P_MobjFlip(mo)*mo->momz < 0) // falling
|
if (P_MobjFlip(mo)*mo->momz < 0) // falling
|
||||||
{
|
{
|
||||||
|
boolean clipmomz = true;
|
||||||
|
|
||||||
mo->pmomz = 0; // We're on a new floor, don't keep doing platform movement.
|
mo->pmomz = 0; // We're on a new floor, don't keep doing platform movement.
|
||||||
|
|
||||||
// Squat down. Decrease viewheight for a moment after hitting the ground (hard),
|
// Squat down. Decrease viewheight for a moment after hitting the ground (hard),
|
||||||
|
@ -3213,6 +3219,9 @@ static void P_PlayerZMovement(mobj_t *mo)
|
||||||
S_StartSound(mo, sfx_s3k47);
|
S_StartSound(mo, sfx_s3k47);
|
||||||
P_ElementalFire(mo->player, true);
|
P_ElementalFire(mo->player, true);
|
||||||
}
|
}
|
||||||
|
P_SetObjectMomZ(mo, 5*FRACUNIT/2, false);
|
||||||
|
P_SetPlayerMobjState(mo, S_PLAY_FALL);
|
||||||
|
clipmomz = false;
|
||||||
}
|
}
|
||||||
else if ((mo->player->powers[pw_shield] & SH_FORCE) == SH_FORCE) // Force shield's dodge dash.
|
else if ((mo->player->powers[pw_shield] & SH_FORCE) == SH_FORCE) // Force shield's dodge dash.
|
||||||
{
|
{
|
||||||
|
@ -3234,12 +3243,15 @@ static void P_PlayerZMovement(mobj_t *mo)
|
||||||
if (!(mo->player->pflags & PF_SPINNING))
|
if (!(mo->player->pflags & PF_SPINNING))
|
||||||
mo->player->pflags &= ~PF_STARTDASH;
|
mo->player->pflags &= ~PF_STARTDASH;
|
||||||
|
|
||||||
|
if (clipmomz)
|
||||||
|
{
|
||||||
if (tmfloorthing && (tmfloorthing->flags & (MF_PUSHABLE|MF_MONITOR)
|
if (tmfloorthing && (tmfloorthing->flags & (MF_PUSHABLE|MF_MONITOR)
|
||||||
|| tmfloorthing->flags2 & MF2_STANDONME || tmfloorthing->type == MT_PLAYER))
|
|| tmfloorthing->flags2 & MF2_STANDONME || tmfloorthing->type == MT_PLAYER))
|
||||||
mo->momz = tmfloorthing->momz;
|
mo->momz = tmfloorthing->momz;
|
||||||
else if (!tmfloorthing)
|
else if (!tmfloorthing)
|
||||||
mo->momz = 0;
|
mo->momz = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (tmfloorthing && (tmfloorthing->flags & (MF_PUSHABLE|MF_MONITOR)
|
else if (tmfloorthing && (tmfloorthing->flags & (MF_PUSHABLE|MF_MONITOR)
|
||||||
|| tmfloorthing->flags2 & MF2_STANDONME || tmfloorthing->type == MT_PLAYER))
|
|| tmfloorthing->flags2 & MF2_STANDONME || tmfloorthing->type == MT_PLAYER))
|
||||||
mo->momz = tmfloorthing->momz;
|
mo->momz = tmfloorthing->momz;
|
||||||
|
|
|
@ -6244,7 +6244,7 @@ void P_ElementalFire(player_t *player, boolean cropcircle)
|
||||||
P_SetScale(flame, player->mo->scale);
|
P_SetScale(flame, player->mo->scale);
|
||||||
flame->eflags = (flame->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP);
|
flame->eflags = (flame->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP);
|
||||||
|
|
||||||
flame->momx = 8;
|
flame->momx = 8; // this is a hack which is used to ensure it still behaves as a missile and can damage others
|
||||||
P_XYMovement(flame);
|
P_XYMovement(flame);
|
||||||
if (P_MobjWasRemoved(flame))
|
if (P_MobjWasRemoved(flame))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue