mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Merge branch 'deathlaunch' into 'master'
Fix players being launched by slopes and pmomz when dying. See merge request STJr/SRB2Internal!452
This commit is contained in:
commit
7c7fc35ec5
2 changed files with 6 additions and 1 deletions
|
@ -2482,6 +2482,8 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
|||
P_UnsetThingPosition(target);
|
||||
target->flags |= MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY;
|
||||
P_SetThingPosition(target);
|
||||
target->standingslope = NULL;
|
||||
target->pmomz = 0;
|
||||
|
||||
if (target->player->powers[pw_super])
|
||||
{
|
||||
|
|
|
@ -1861,6 +1861,9 @@ void P_XYMovement(mobj_t *mo)
|
|||
oldy = mo->y;
|
||||
|
||||
#ifdef ESLOPE
|
||||
if (mo->flags & MF_NOCLIPHEIGHT)
|
||||
mo->standingslope = NULL;
|
||||
|
||||
// adjust various things based on slope
|
||||
if (mo->standingslope && abs(mo->standingslope->zdelta) > FRACUNIT>>8) {
|
||||
if (!P_IsObjectOnGround(mo)) { // We fell off at some point? Do the twisty thing!
|
||||
|
@ -2051,7 +2054,7 @@ void P_XYMovement(mobj_t *mo)
|
|||
return;
|
||||
|
||||
#ifdef ESLOPE
|
||||
if (moved && oldslope) { // Check to see if we ran off
|
||||
if (moved && oldslope && !(mo->flags & MF_NOCLIPHEIGHT)) { // Check to see if we ran off
|
||||
|
||||
if (oldslope != mo->standingslope) { // First, compare different slopes
|
||||
angle_t oldangle, newangle;
|
||||
|
|
Loading…
Reference in a new issue