From 0a9f3b452a4d3e272ef584fa02d10d529cd222b4 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sun, 30 Apr 2023 10:31:26 -0400 Subject: [PATCH] Make MAXRADIUS bigger MAXRADIUS was previously an arbitrary value id Software set as whatever their biggest object would be (which they broke that rule anyway). It is now the radius of a blockmap block, which should be a large enough of a nudge value to handle all cases. (Still don't recommend making objects any bigger than a Spider Mastermind though.) --- src/p_local.h | 4 +--- src/p_mobj.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/p_local.h b/src/p_local.h index 5b3d7f7b2..7ced38f2f 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -46,9 +46,7 @@ #define BMBOUNDFIX(xl, xh, yl, yh) {if (xl > xh) xl = 0; if (yl > yh) yl = 0;} // MAXRADIUS is for precalculated sector block boxes -// the spider demon is larger, -// but we do not have any moving sectors nearby -#define MAXRADIUS (32*FRACUNIT) +#define MAXRADIUS (MAPBLOCKSIZE >> 1) // max Z move up or down without jumping // above this, a height difference is considered as a 'dropoff' diff --git a/src/p_mobj.c b/src/p_mobj.c index 6ffc84c66..6ab24c5d2 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12406,7 +12406,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean // Ambush = double size (grounded) / half size (aerial) if (!(mthing->options & MTF_AMBUSH) == !P_IsObjectOnGround(mobj)) { - mobj->extravalue1 = min(mobj->extravalue1 << 1, FixedDiv(64*FRACUNIT, mobj->info->radius)); // don't make them larger than the blockmap can handle + mobj->extravalue1 = min(mobj->extravalue1 << 1, FixedDiv(MAPBLOCKSIZE, mobj->info->radius)); // don't make them larger than the blockmap can handle mobj->scalespeed <<= 1; } break;