Added an experiment with an alternate CEZ3 pinch behaviour (but keep it disabled because it was kind of boring).

This commit is contained in:
toaster 2019-10-24 19:55:02 +01:00
parent ea0fe50f5a
commit 4ff46d14dd
1 changed files with 20 additions and 4 deletions

View File

@ -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)