mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-28 23:21:58 +00:00
Zwip Zwap Zapony's suggestions
This commit is contained in:
parent
2181dadb4c
commit
b4ad054422
4 changed files with 10 additions and 34 deletions
|
@ -14799,12 +14799,18 @@ void A_RolloutRock(mobj_t *actor)
|
||||||
|
|
||||||
if (!actor->tracer || P_MobjWasRemoved(actor->tracer) || !actor->tracer->health)
|
if (!actor->tracer || P_MobjWasRemoved(actor->tracer) || !actor->tracer->health)
|
||||||
actor->flags |= MF_PUSHABLE;
|
actor->flags |= MF_PUSHABLE;
|
||||||
|
else if (actor->tracer->eflags & MFE_VERTICALFLIP)
|
||||||
|
{
|
||||||
|
actor->flags2 |= MF2_OBJECTFLIP;
|
||||||
|
actor->eflags |= MFE_VERTICALFLIP;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
actor->flags2 = (actor->flags2 & ~MF2_OBJECTFLIP) | (actor->tracer->flags2 & MF2_OBJECTFLIP);
|
actor->flags2 &= ~MF2_OBJECTFLIP;
|
||||||
actor->eflags = (actor->eflags & ~MFE_VERTICALFLIP) | (actor->tracer->eflags & MFE_VERTICALFLIP);
|
actor->eflags &= ~MFE_VERTICALFLIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
actor->friction = FRACUNIT; // turns out riding on solids sucks, so let's just make it easier on ourselves
|
actor->friction = FRACUNIT; // turns out riding on solids sucks, so let's just make it easier on ourselves
|
||||||
|
|
||||||
if (actor->eflags & MFE_JUSTHITFLOOR)
|
if (actor->eflags & MFE_JUSTHITFLOOR)
|
||||||
|
|
|
@ -1057,9 +1057,6 @@ static unsigned PIT_DoCheckThing(mobj_t *thing)
|
||||||
if (!P_IsObjectOnGround(thing))
|
if (!P_IsObjectOnGround(thing))
|
||||||
thing->momz += tmthing->momz;
|
thing->momz += tmthing->momz;
|
||||||
|
|
||||||
thing->extravalue1 = thing->flags2;
|
|
||||||
thing->extravalue2 = thing->eflags;
|
|
||||||
|
|
||||||
return CHECKTHING_COLLIDE;
|
return CHECKTHING_COLLIDE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1526,11 +1526,6 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
||||||
case MT_CYBRAKDEMON:
|
case MT_CYBRAKDEMON:
|
||||||
gravityadd >>= 1;
|
gravityadd >>= 1;
|
||||||
break;
|
break;
|
||||||
case MT_ROLLOUTROCK:
|
|
||||||
// If a player has gravity boots and its riding a rollout rock, the rock should copy the player's gravity
|
|
||||||
if (mo->tracer && mo->tracer->player && mo->tracer->player->powers[pw_gravityboots])
|
|
||||||
gravityadd = -gravityadd;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
26
src/p_user.c
26
src/p_user.c
|
@ -1084,22 +1084,11 @@ void P_ResetPlayer(player_t *player)
|
||||||
player->mo->tracer->flags |= MF_PUSHABLE;
|
player->mo->tracer->flags |= MF_PUSHABLE;
|
||||||
|
|
||||||
// goose the mom a little bit to trigger gravity to process for a tic
|
// goose the mom a little bit to trigger gravity to process for a tic
|
||||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
if (player->mo->tracer->eflags & MFE_VERTICALFLIP)
|
||||||
player->mo->tracer->momz -= 1;
|
player->mo->tracer->momz -= 1;
|
||||||
else
|
else
|
||||||
player->mo->tracer->momz += 1;
|
player->mo->tracer->momz += 1;
|
||||||
|
|
||||||
// Restore MF2_OBJECTFLIP / MFE_VERTICALFLIP
|
|
||||||
if (player->mo->tracer->extravalue1 & MF2_OBJECTFLIP)
|
|
||||||
player->mo->tracer->flags2 |= MF2_OBJECTFLIP;
|
|
||||||
else
|
|
||||||
player->mo->tracer->flags2 &= ~MF2_OBJECTFLIP;
|
|
||||||
|
|
||||||
if (player->mo->tracer->extravalue2 & MFE_VERTICALFLIP)
|
|
||||||
player->mo->tracer->eflags |= MFE_VERTICALFLIP;
|
|
||||||
else
|
|
||||||
player->mo->tracer->eflags &= ~MFE_VERTICALFLIP;
|
|
||||||
|
|
||||||
P_SetTarget(&player->mo->tracer->tracer, NULL);
|
P_SetTarget(&player->mo->tracer->tracer, NULL);
|
||||||
}
|
}
|
||||||
P_SetTarget(&player->mo->tracer, NULL);
|
P_SetTarget(&player->mo->tracer, NULL);
|
||||||
|
@ -4580,22 +4569,11 @@ void P_DoJump(player_t *player, boolean soundandstate, boolean allowflip)
|
||||||
P_SetObjectMomZ(player->mo->tracer, -9*FRACUNIT, true);
|
P_SetObjectMomZ(player->mo->tracer, -9*FRACUNIT, true);
|
||||||
|
|
||||||
// goose the mom a little bit to trigger gravity to process for a tic
|
// goose the mom a little bit to trigger gravity to process for a tic
|
||||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
if (player->mo->tracer->eflags & MFE_VERTICALFLIP)
|
||||||
player->mo->tracer->momz -= 1;
|
player->mo->tracer->momz -= 1;
|
||||||
else
|
else
|
||||||
player->mo->tracer->momz += 1;
|
player->mo->tracer->momz += 1;
|
||||||
|
|
||||||
// Restore MF2_OBJECTFLIP / MFE_VERTICALFLIP
|
|
||||||
if (player->mo->tracer->extravalue1 & MF2_OBJECTFLIP)
|
|
||||||
player->mo->tracer->flags2 |= MF2_OBJECTFLIP;
|
|
||||||
else
|
|
||||||
player->mo->tracer->flags2 &= ~MF2_OBJECTFLIP;
|
|
||||||
|
|
||||||
if (player->mo->tracer->extravalue2 & MFE_VERTICALFLIP)
|
|
||||||
player->mo->tracer->eflags |= MFE_VERTICALFLIP;
|
|
||||||
else
|
|
||||||
player->mo->tracer->eflags &= ~MFE_VERTICALFLIP;
|
|
||||||
|
|
||||||
player->mo->tracer->flags |= MF_PUSHABLE;
|
player->mo->tracer->flags |= MF_PUSHABLE;
|
||||||
P_SetTarget(&player->mo->tracer->tracer, NULL);
|
P_SetTarget(&player->mo->tracer->tracer, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue