Implement bumpy floor

This commit is contained in:
Sally Coolatta 2021-12-09 16:12:09 -05:00
parent b3d3135c58
commit 047b725a30

View file

@ -415,6 +415,26 @@ void K_ProcessTerrainEffect(mobj_t *mo)
P_InstaThrust(mo, mo->angle, speed);
}
// Bumpy floor
if (terrain->flags & TRF_STAIRJANK)
{
/* use a shorter sound if not two tics have passed
* since the last step */
S_StartSound(mo, player->stairjank
>= 16 ? sfx_s23b : sfx_s268);
if (player->stairjank == 0)
{
mobj_t *spark = P_SpawnMobjFromMobj(mo,
0, 0, 0, MT_JANKSPARK);
spark->fuse = 9;
spark->cusval = K_StairJankFlip(ANGLE_90);
P_SetTarget(&spark->target, mo);
}
player->stairjank = 17;
}
// (Offroad is handled elsewhere!)
}