From ea0fe50f5a7923bf8683daa4e73f0a84a771c074 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 24 Oct 2019 19:33:03 +0100 Subject: [PATCH 1/2] Fix CEZ3's first phase being cheated by Fang. --- src/p_mobj.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index f1dc5d760..650d0f561 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -4929,6 +4929,7 @@ static void P_Boss4Thinker(mobj_t *mobj) mobj->movecount += mobj->threshold; if (mobj->movecount <= 0) { + mobj->flags2 &= ~MF2_INVERTAIMABLE; mobj->movecount = 0; mobj->movedir++; // Initialization complete, next phase! } @@ -10308,6 +10309,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) mobj->movefactor = -512*FRACUNIT; mobj->flags2 |= MF2_CLASSICPUSH; break; + case MT_EGGMOBILE4: + mobj->flags2 |= MF2_INVERTAIMABLE; + break; case MT_FLICKY_08: mobj->color = (P_RandomChance(FRACUNIT/2) ? SKINCOLOR_RED : SKINCOLOR_AQUA); break; From 4ff46d14dd936e5a997ee48b4ac284e9371c86f3 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 24 Oct 2019 19:55:02 +0100 Subject: [PATCH 2/2] Added an experiment with an alternate CEZ3 pinch behaviour (but keep it disabled because it was kind of boring). --- src/p_mobj.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 650d0f561..d612bbbec 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<watertop+(8<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<spawnpoint->y<tracer)) // there are 10 per spoke, remember that { - dx = (originx + P_ReturnThrustX(mobj, angle, (9*132)<x)/9; - dy = (originy + P_ReturnThrustY(mobj, angle, (9*132)<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)<y + P_ReturnThrustY(mobj, angle, (112)<hnext, --s)