MT_WALLSPIKE: let radius be increased without requiring map/HVR adjustment

This commit is contained in:
James R 2023-11-15 14:51:16 -08:00
parent 600aec3449
commit 2ebbfe3e7a

View file

@ -13867,7 +13867,16 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj)
// Use per-thing collision for spikes unless the intangible flag is checked.
if (!(mthing->thing_args[2] & TMSF_INTANGIBLE) && !metalrecording)
{
const fixed_t kSpriteRadius = 16 * mobj->scale;
fixed_t x = FixedMul(mobj->radius - kSpriteRadius, FCOS(mobj->angle));
fixed_t y = FixedMul(mobj->radius - kSpriteRadius, FSIN(mobj->angle));
mobj->sprxoff -= x;
mobj->spryoff -= y;
P_UnsetThingPosition(mobj);
mobj->x += x;
mobj->y += y;
mobj->flags &= ~(MF_NOBLOCKMAP | MF_NOCLIPHEIGHT);
mobj->flags |= MF_SOLID;
P_SetThingPosition(mobj);