mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 13:10:55 +00:00
Added an experiment with an alternate CEZ3 pinch behaviour (but keep it disabled because it was kind of boring).
This commit is contained in:
parent
ea0fe50f5a
commit
4ff46d14dd
1 changed files with 20 additions and 4 deletions
24
src/p_mobj.c
24
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.
|
// Pull them closer.
|
||||||
static void P_Boss4PinchSpikeballs(mobj_t *mobj, angle_t angle, fixed_t dz)
|
static void P_Boss4PinchSpikeballs(mobj_t *mobj, angle_t angle, fixed_t dz)
|
||||||
{
|
{
|
||||||
INT32 s;
|
INT32 s;
|
||||||
mobj_t *base = mobj, *seg;
|
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)
|
if (mobj->spawnpoint)
|
||||||
{
|
{
|
||||||
originx = mobj->spawnpoint->x << FRACBITS;
|
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;
|
originx = mobj->x;
|
||||||
originy = mobj->y;
|
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;
|
dz /= 9;
|
||||||
|
|
||||||
while ((base = base->tracer)) // there are 10 per spoke, remember that
|
while ((base = base->tracer)) // there are 10 per spoke, remember that
|
||||||
{
|
{
|
||||||
dx = (originx + P_ReturnThrustX(mobj, angle, (9*132)<<FRACBITS) - mobj->x)/9;
|
#ifdef CEZ3TILT
|
||||||
dy = (originy + P_ReturnThrustY(mobj, angle, (9*132)<<FRACBITS) - mobj->y)/9;
|
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);
|
workx = mobj->x + P_ReturnThrustX(mobj, angle, (112)<<FRACBITS);
|
||||||
worky = mobj->y + P_ReturnThrustY(mobj, angle, (112)<<FRACBITS);
|
worky = mobj->y + P_ReturnThrustY(mobj, angle, (112)<<FRACBITS);
|
||||||
for (seg = base, s = 9; seg; seg = seg->hnext, --s)
|
for (seg = base, s = 9; seg; seg = seg->hnext, --s)
|
||||||
|
|
Loading…
Reference in a new issue