diff --git a/src/p_mobj.c b/src/p_mobj.c index 650d0f56175c281b36726c70917eeb028b9b644c..d612bbbeca83654d6f0712a8f868f135b0d28378 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -4716,13 +4716,17 @@ static void P_Boss4MoveSpikeballs(mobj_t *mobj, angle_t angle, fixed_t fz) } } +#define CEZ3TILT + // Pull them closer. static void P_Boss4PinchSpikeballs(mobj_t *mobj, angle_t angle, fixed_t dz) { INT32 s; mobj_t *base = mobj, *seg; - fixed_t originx, originy, workx, worky, dx, dy, bz = mobj->watertop+(8<<FRACBITS); - + fixed_t workx, worky, dx, dy, bz = mobj->watertop+(8<<FRACBITS); + fixed_t rad = (9*132)<<FRACBITS; +#ifdef CEZ3TILT + fixed_t originx, originy; if (mobj->spawnpoint) { originx = mobj->spawnpoint->x << FRACBITS; @@ -4733,13 +4737,25 @@ static void P_Boss4PinchSpikeballs(mobj_t *mobj, angle_t angle, fixed_t dz) originx = mobj->x; originy = mobj->y; } +#else + if (mobj->spawnpoint) + { + rad -= R_PointToDist2(mobj->x, mobj->y, + (mobj->spawnpoint->x<<FRACBITS), (mobj->spawnpoint->y<<FRACBITS)); + } +#endif dz /= 9; while ((base = base->tracer)) // there are 10 per spoke, remember that { - dx = (originx + P_ReturnThrustX(mobj, angle, (9*132)<<FRACBITS) - mobj->x)/9; - dy = (originy + P_ReturnThrustY(mobj, angle, (9*132)<<FRACBITS) - mobj->y)/9; +#ifdef CEZ3TILT + dx = (originx + P_ReturnThrustX(mobj, angle, rad) - mobj->x)/9; + dy = (originy + P_ReturnThrustY(mobj, angle, rad) - mobj->y)/9; +#else + dx = P_ReturnThrustX(mobj, angle, rad)/9; + dy = P_ReturnThrustY(mobj, angle, rad)/9; +#endif workx = mobj->x + P_ReturnThrustX(mobj, angle, (112)<<FRACBITS); worky = mobj->y + P_ReturnThrustY(mobj, angle, (112)<<FRACBITS); for (seg = base, s = 9; seg; seg = seg->hnext, --s)