Some cleanup.

This commit is contained in:
toasterbabe 2017-02-12 14:16:52 +00:00
parent 6dfef794a4
commit 5f3cfc6729

View file

@ -5858,11 +5858,10 @@ static void P_Boss9Thinker(mobj_t *mobj)
if (!mobj->threshold) { // failed bounce!
S_StartSound(mobj, sfx_mspogo);
P_BounceMove(mobj);
mobj->angle = R_PointToAngle2(0,0,mobj->momx, mobj->momy);
P_TryMove(mobj, mobj->x+mobj->momx, mobj->y+mobj->momy, true);
mobj->angle = R_PointToAngle2(mobj->momx, mobj->momy,0,0);
mobj->watertop = mobj->target->floorz + 32*FRACUNIT;
mobj->flags &= ~MF_PAIN;
mobj->fuse = 10*TICRATE;
mobj->fuse = 0;
mobj->movecount = 0;
vectorise;
} else if (!(mobj->threshold%4)) { // We've decided to lock onto the player this bounce.
@ -5884,8 +5883,9 @@ static void P_Boss9Thinker(mobj_t *mobj)
mobj->angle += mobj->movedir;
P_InstaThrust(mobj, mobj->angle, -speed);
while (!P_TryMove(mobj, mobj->x+mobj->momx, mobj->y+mobj->momy, true) && tries++ < 16) {
mobj->angle += mobj->movedir;
P_InstaThrust(mobj, mobj->angle, -speed);
S_StartSound(mobj, sfx_mspogo);
P_BounceMove(mobj);
mobj->angle = R_PointToAngle2(mobj->momx, mobj->momy,0,0);
}
mobj->momx = mobj->momy = 0;
mobj->threshold--;