if (mobj->flags2 & MF2_AMBUSH)
{
mobj->colorized = true;
mobj->color = (1 + (leveltime % (MAXSKINCOLORS-1)));
mobj->frame |= FF_FULLBRIGHT;
}
else
{
mobj->colorized = false;
mobj->color = SKINCOLOR_NONE;
mobj->frame &= (~FF_FULLBRIGHT);
}
if (!thwompsactive)
break;
if (mobj->reactiontime)
mobj->reactiontime--;
else
{
if (mobj->extravalue1)
{
P_SpawnGhostMobj(mobj)->tics = 3;
if (mobj->z == mobj->floorz)
{
UINT8 i;
mobj->extravalue1 = 0;
mobj->reactiontime = mobj->info->reactiontime;
S_StartSound(mobj, sfx_s1bd);
for (i = 0; i < 8; i++)
{
mobj_t *dust = P_SpawnMobj(mobj->x, mobj->y, mobj->z, MT_DRIFTDUST);
P_InstaThrust(dust, FixedAngle(((360*FRACUNIT)/8) * i), mobj->info->speed/8);
dust->momz = P_MobjFlip(mobj) * (P_RandomRange(1,4)<<FRACBITS);
dust->scale = mobj->scale/2;
dust->destscale = mobj->scale*3;
}
}
else
mobj->momz = (-mobj->info->speed) * P_MobjFlip(mobj);
}
else
{
if (mobj->z > mobj->movefactor)
mobj->z = mobj->movefactor;
if (mobj->z == mobj->movefactor)
{
mobj->extravalue1 = 1;
//S_StartSound(mobj, sfx_s1bb);
}
else
mobj->momz = (mobj->info->speed/16) * P_MobjFlip(mobj);
}
}
break;
if (mobj->flags2 & MF2_AMBUSH)
{
mobj->colorized = true;
mobj->color = (1 + (leveltime % (MAXSKINCOLORS-1)));
mobj->frame |= FF_FULLBRIGHT;
}
else
{
mobj->colorized = false;
mobj->color = SKINCOLOR_NONE;
mobj->frame &= (~FF_FULLBRIGHT);
}
mobj->flags2 ^= MF2_DONTDRAW;
if (P_IsObjectOnGround(mobj))
{
P_RemoveMobj(mobj);
return;
}
break;
break;