From c00144a4f8a3693899f71182ab364255441feb0e Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Sun, 29 Sep 2019 19:29:34 +0200 Subject: [PATCH 1/2] Pterabyte: Don't target players who are invincible after being hurt --- src/dehacked.c | 1 + src/p_mobj.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/dehacked.c b/src/dehacked.c index bb1785695..192f2c712 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -8605,6 +8605,7 @@ struct { {"CR_MINECART",CR_MINECART}, {"CR_ROLLOUT", CR_ROLLOUT}, {"CR_PTERABYTE",CR_PTERABYTE}, + // Ring weapons (ringweapons_t) // Useful for A_GiveWeapon {"RW_AUTO",RW_AUTO}, diff --git a/src/p_mobj.c b/src/p_mobj.c index 4388c1bd6..5cd9c27e2 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9107,6 +9107,12 @@ void P_MobjThinker(mobj_t *mobj) if (!mobj->target) break; + if (mobj->target->player->powers[pw_flashing]) + { + P_SetTarget(&mobj->target, NULL); + break; + } + vdist = mobj->z - mobj->target->z - mobj->target->height; if (vdist <= 0) { From cd45bca84840609f034a8c7878cceeca95d28407 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Sun, 29 Sep 2019 19:51:27 +0200 Subject: [PATCH 2/2] Pterabyte: Don't drop off player in the first ten tics after grabbing --- src/p_user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index ec431a86a..54429c8f8 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -11930,7 +11930,7 @@ void P_PlayerAfterThink(player_t *player) if (ptera->health <= 0) goto dropoff; - if (P_MobjAboveLava(ptera)) + if (P_MobjAboveLava(ptera) && ptera->movefactor <= 3*TICRATE - 10) goto dropoff; if (player->mo->eflags & MFE_VERTICALFLIP) @@ -11939,7 +11939,7 @@ void P_PlayerAfterThink(player_t *player) && (ptera->eflags & MFE_VERTICALFLIP)) // Reverse gravity check for the carrier - Flame player->mo->z = ptera->z + ptera->height + FixedMul(FRACUNIT, player->mo->scale); - if (ptera->ceilingz - ptera->z > spawnpoint->ceilingz - spawnpoint->z + 512*FRACUNIT) + if (ptera->ceilingz - ptera->z > spawnpoint->ceilingz - spawnpoint->z + 512*FRACUNIT && ptera->movefactor <= 3 * TICRATE - 10) goto dropoff; } else @@ -11948,7 +11948,7 @@ void P_PlayerAfterThink(player_t *player) && !(ptera->eflags & MFE_VERTICALFLIP)) // Correct gravity check for the carrier - Flame player->mo->z = ptera->z - player->mo->height - FixedMul(FRACUNIT, player->mo->scale); - if (ptera->z - ptera->floorz > spawnpoint->z - spawnpoint->floorz + 512 * FRACUNIT) + if (ptera->z - ptera->floorz > spawnpoint->z - spawnpoint->floorz + 512 * FRACUNIT && ptera->movefactor <= 3 * TICRATE - 10) goto dropoff; }