mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
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.)
This commit is contained in:
parent
20d0f2d3fb
commit
833131b319
3 changed files with 3 additions and 5 deletions
|
|
@ -139,7 +139,7 @@ boolean Obj_RandomItemSpawnIn(mobj_t *mobj)
|
|||
fixed_t Obj_RandomItemScale(fixed_t oldScale)
|
||||
{
|
||||
const fixed_t intendedScale = oldScale * 3;
|
||||
const fixed_t maxScale = FixedDiv(128*FRACUNIT, mobjinfo[MT_RANDOMITEM].radius); // don't make them larger than the blockmap can handle
|
||||
const fixed_t maxScale = FixedDiv(MAPBLOCKSIZE, mobjinfo[MT_RANDOMITEM].radius); // don't make them larger than the blockmap can handle
|
||||
|
||||
return min(intendedScale, maxScale);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,9 +50,7 @@ extern "C" {
|
|||
#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'
|
||||
|
|
|
|||
|
|
@ -13139,7 +13139,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
// Ambush = double size (grounded) / half size (aerial)
|
||||
if (!(mthing->args[2] & TMICF_INVERTSIZE) == !P_IsObjectOnGround(mobj))
|
||||
{
|
||||
mobj->extravalue1 = min(mobj->extravalue1 << 1, FixedDiv(128*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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue