From eb22f347f35c6a1417a15e61a2550e4181a0b69c Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Mon, 2 Jan 2017 19:04:33 +0000 Subject: [PATCH 1/2] Made Eggscalibur use mobj->watertop instead of mobj->spawnpoint->z because that's not netgame-safe. CEZ3 STILL has some ridiculous inconsistencies, but this is one less to worry about. --- src/p_mobj.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 5e5961d4..a9dedf51 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -4436,7 +4436,7 @@ static void P_Boss4MoveSpikeballs(mobj_t *mobj, angle_t angle, fixed_t fz) { INT32 s; mobj_t *base = mobj, *seg; - fixed_t dist, bz = (mobj->spawnpoint->z+16)<watertop+(16<tracer)) { for (seg = base, dist = 172*FRACUNIT, s = 9; seg; seg = seg->hnext, dist += 124*FRACUNIT, --s) @@ -4450,7 +4450,7 @@ static void P_Boss4PinchSpikeballs(mobj_t *mobj, angle_t angle, fixed_t fz) { INT32 s; mobj_t *base = mobj, *seg; - fixed_t dist, bz = (mobj->spawnpoint->z+16)<watertop+(16<tracer)) { for (seg = base, dist = 112*FRACUNIT, s = 9; seg; seg = seg->hnext, dist += 132*FRACUNIT, --s) @@ -4566,7 +4566,7 @@ static void P_Boss4Thinker(mobj_t *mobj) INT32 i, arm; mobj_t *seg, *base = mobj; // First frame init, spawn all the things. - mobj->spawnpoint->z = mobj->z>>FRACBITS; + mobj->watertop = mobj->z; z = mobj->z + mobj->height/2 - mobjinfo[MT_EGGMOBILE4_MACE].height/2; for (arm = 0; arm <3 ; arm++) { @@ -4622,7 +4622,7 @@ static void P_Boss4Thinker(mobj_t *mobj) case 3: { fixed_t z; - if (mobj->z < (mobj->spawnpoint->z+512)<z < mobj->watertop+(512<momz = 8*FRACUNIT; else { @@ -4631,7 +4631,7 @@ static void P_Boss4Thinker(mobj_t *mobj) } mobj->movecount += 400<<(FRACBITS>>1); mobj->movecount %= 360*FRACUNIT; - z = mobj->z - (mobj->spawnpoint->z<height/2; + z = mobj->z - mobj->watertop - mobjinfo[MT_EGGMOBILE4_MACE].height - mobj->height/2; if (z < 0) // We haven't risen high enough to pull the spikeballs along yet P_Boss4MoveSpikeballs(mobj, FixedAngle(mobj->movecount), 0); // So don't pull the spikeballs along yet. else @@ -4641,13 +4641,13 @@ static void P_Boss4Thinker(mobj_t *mobj) // Pinch phase! case 4: { - if (mobj->z < (mobj->spawnpoint->z+512+128*(mobj->info->damage-mobj->health))<z < mobj->watertop+(512+128*(mobj->info->damage-mobj->health))<momz = 8*FRACUNIT; else mobj->momz = 0; mobj->movecount += (800+800*(mobj->info->damage-mobj->health))<<(FRACBITS>>1); mobj->movecount %= 360*FRACUNIT; - P_Boss4PinchSpikeballs(mobj, FixedAngle(mobj->movecount), mobj->z - (mobj->spawnpoint->z<height/2); + P_Boss4PinchSpikeballs(mobj, FixedAngle(mobj->movecount), mobj->z - mobj->watertop - mobjinfo[MT_EGGMOBILE4_MACE].height - mobj->height/2); if (!mobj->target || !mobj->target->health) P_SupermanLook4Players(mobj); From a4fe3580e2795e1852e818a66e5a92b8c81ef70a Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Mon, 2 Jan 2017 19:07:20 +0000 Subject: [PATCH 2/2] Forgot to commit this compiling fix. --- src/p_mobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index a9dedf51..c150b691 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -4641,7 +4641,7 @@ static void P_Boss4Thinker(mobj_t *mobj) // Pinch phase! case 4: { - if (mobj->z < mobj->watertop+(512+128*(mobj->info->damage-mobj->health))<z < (mobj->watertop + ((512+128*(mobj->info->damage-mobj->health))<momz = 8*FRACUNIT; else mobj->momz = 0;