mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Standards
This commit is contained in:
parent
431206ebee
commit
c76a8e8a58
1 changed files with 31 additions and 26 deletions
39
src/p_mobj.c
39
src/p_mobj.c
|
@ -7996,16 +7996,6 @@ static void P_MobjSceneryThink(mobj_t *mobj)
|
|||
mobj->frame = (mobj->frame & ~FF_TRANSMASK) | ((10 - (mobj->fuse*2)) << (FF_TRANSSHIFT));
|
||||
}
|
||||
break;
|
||||
case MT_VWREF:
|
||||
case MT_VWREB:
|
||||
{
|
||||
INT32 strength;
|
||||
++mobj->movedir;
|
||||
mobj->frame &= ~FF_TRANSMASK;
|
||||
strength = min(mobj->fuse, (INT32)mobj->movedir)*3;
|
||||
if (strength < 10)
|
||||
mobj->frame |= ((10 - strength) << (FF_TRANSSHIFT));
|
||||
}
|
||||
case MT_FINISHFLAG:
|
||||
{
|
||||
if (!mobj->target || mobj->target->player->playerstate == PST_DEAD || !cv_exitmove.value)
|
||||
|
@ -8019,19 +8009,34 @@ static void P_MobjSceneryThink(mobj_t *mobj)
|
|||
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);
|
||||
{
|
||||
fixed_t radius = FixedMul(10*mobj->info->speed, mobj->target->scale);
|
||||
angle_t fa;
|
||||
|
||||
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;
|
||||
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:
|
||||
{
|
||||
INT32 strength;
|
||||
++mobj->movedir;
|
||||
mobj->frame &= ~FF_TRANSMASK;
|
||||
strength = min(mobj->fuse, (INT32)mobj->movedir)*3;
|
||||
if (strength < 10)
|
||||
mobj->frame |= ((10 - strength) << (FF_TRANSSHIFT));
|
||||
}
|
||||
/* FALLTHRU */
|
||||
default:
|
||||
if (mobj->fuse)
|
||||
|
|
Loading…
Reference in a new issue