Allow rollout rock's splash sound delay reduction to occur above water
This commit is contained in:
parent
a01373741b
commit
3600e1b140
|
@ -14238,14 +14238,15 @@ void A_RolloutRock(mobj_t *actor)
|
||||||
|
|
||||||
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->threshold)
|
||||||
|
actor->threshold--;
|
||||||
|
|
||||||
if (inwater && !(actor->flags2 & MF2_AMBUSH)) // buoyancy in water (or lava)
|
if (inwater && !(actor->flags2 & MF2_AMBUSH)) // buoyancy in water (or lava)
|
||||||
{
|
{
|
||||||
UINT8 flip = P_MobjFlip(actor);
|
UINT8 flip = P_MobjFlip(actor);
|
||||||
fixed_t prevmomz = actor->momz;
|
fixed_t prevmomz = actor->momz;
|
||||||
actor->momz = FixedMul(actor->momz, locvar2);
|
actor->momz = FixedMul(actor->momz, locvar2);
|
||||||
actor->momz += flip * FixedMul(locvar2, actor->scale);
|
actor->momz += flip * FixedMul(locvar2, actor->scale);
|
||||||
if (actor->threshold)
|
|
||||||
actor->threshold--;
|
|
||||||
if (flip*prevmomz < 0 && flip*actor->momz >= 0 && !actor->threshold)
|
if (flip*prevmomz < 0 && flip*actor->momz >= 0 && !actor->threshold)
|
||||||
{
|
{
|
||||||
if (actor->eflags & MFE_UNDERWATER)
|
if (actor->eflags & MFE_UNDERWATER)
|
||||||
|
|
Loading…
Reference in a new issue