diff --git a/src/p_mobj.c b/src/p_mobj.c index f53f2a7d5..299083b03 100644 --- a/src/p_mobj.c +++ b/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)