Make Gachabom stay still when tossing forward

This commit is contained in:
Sally Coolatta 2022-12-19 01:50:14 -05:00
parent 321c8bf976
commit fed08a28a1

View file

@ -7058,8 +7058,40 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
}
}
break;
case MT_ORBINAUT:
case MT_GACHABOM:
{
if (mobj->flags2 & MF2_AMBUSH)
{
mobj->friction = ORIG_FRICTION/4;
if (mobj->momx || mobj->momy)
{
mobj_t *ghost = P_SpawnGhostMobj(mobj);
if (mobj->target && !P_MobjWasRemoved(mobj->target) && mobj->target->player)
{
ghost->color = mobj->target->player->skincolor;
ghost->colorized = true;
}
}
if (P_IsObjectOnGround(mobj))
{
if (mobj->movecount > 1)
{
S_StartSound(mobj, mobj->info->activesound);
mobj->momx = mobj->momy = 0;
mobj->movecount = 1;
}
}
if (mobj->threshold > 0)
mobj->threshold--;
break;
}
}
/* FALLTHRU */
case MT_ORBINAUT:
{
Obj_OrbinautThink(mobj);
P_MobjCheckWater(mobj);