mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Standards
This commit is contained in:
parent
431206ebee
commit
c76a8e8a58
1 changed files with 31 additions and 26 deletions
57
src/p_mobj.c
57
src/p_mobj.c
|
@ -7996,6 +7996,37 @@ static void P_MobjSceneryThink(mobj_t *mobj)
|
|||
mobj->frame = (mobj->frame & ~FF_TRANSMASK) | ((10 - (mobj->fuse*2)) << (FF_TRANSSHIFT));
|
||||
}
|
||||
break;
|
||||
case MT_FINISHFLAG:
|
||||
{
|
||||
if (!mobj->target || mobj->target->player->playerstate == PST_DEAD || !cv_exitmove.value)
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!camera.chase)
|
||||
mobj->flags2 |= MF2_DONTDRAW;
|
||||
else
|
||||
mobj->flags2 &= ~MF2_DONTDRAW;
|
||||
|
||||
P_UnsetThingPosition(mobj);
|
||||
{
|
||||
fixed_t radius = FixedMul(10*mobj->info->speed, mobj->target->scale);
|
||||
angle_t fa;
|
||||
|
||||
mobj->angle += FixedAngle(mobj->info->speed);
|
||||
|
||||
fa = mobj->angle >> ANGLETOFINESHIFT;
|
||||
|
||||
mobj->x = mobj->target->x + FixedMul(FINECOSINE(fa),radius);
|
||||
mobj->y = mobj->target->y + FixedMul(FINESINE(fa),radius);
|
||||
mobj->z = mobj->target->z + mobj->target->height/2;
|
||||
}
|
||||
P_SetThingPosition(mobj);
|
||||
|
||||
P_SetScale(mobj, mobj->target->scale);
|
||||
}
|
||||
break;
|
||||
case MT_VWREF:
|
||||
case MT_VWREB:
|
||||
{
|
||||
|
@ -8006,32 +8037,6 @@ static void P_MobjSceneryThink(mobj_t *mobj)
|
|||
if (strength < 10)
|
||||
mobj->frame |= ((10 - strength) << (FF_TRANSSHIFT));
|
||||
}
|
||||
case MT_FINISHFLAG:
|
||||
{
|
||||
if (!mobj->target || mobj->target->player->playerstate == PST_DEAD || !cv_exitmove.value)
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!camera.chase)
|
||||
mobj->flags2 |= MF2_DONTDRAW;
|
||||
else
|
||||
mobj->flags2 &= ~MF2_DONTDRAW;
|
||||
|
||||
fixed_t radius = FixedMul(10*mobj->info->speed, mobj->target->scale);
|
||||
mobj->angle += FixedAngle(mobj->info->speed);
|
||||
angle_t fa = mobj->angle >> ANGLETOFINESHIFT;
|
||||
|
||||
P_UnsetThingPosition(mobj);
|
||||
|
||||
mobj->x = mobj->target->x + FixedMul(FINECOSINE(fa),radius);
|
||||
mobj->y = mobj->target->y + FixedMul(FINESINE(fa),radius);
|
||||
mobj->z = mobj->target->z + mobj->target->height/2;
|
||||
|
||||
P_SetThingPosition(mobj);
|
||||
P_SetScale(mobj, mobj->target->scale);
|
||||
}
|
||||
/* FALLTHRU */
|
||||
default:
|
||||
if (mobj->fuse)
|
||||
|
|
Loading…
Reference in a new issue