From 6d43fad0986b72a5df3c63bcf434e6b03cbe250b Mon Sep 17 00:00:00 2001 From: toasterbabe <rollerorbital@gmail.com> Date: Tue, 18 Jul 2017 12:56:39 +0100 Subject: [PATCH] Correct the baseradius stuff. (Still doing some other work, though - will let you know when the branch is safe to review.) --- src/info.c | 2 +- src/p_mobj.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/info.c b/src/info.c index 30f6c082dc..66e1b64cf3 100644 --- a/src/info.c +++ b/src/info.c @@ -6034,7 +6034,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // xdeathstate sfx_None, // deathsound 0, // speed - FRACUNIT/4, // radius + 7*FRACUNIT, // radius 14*FRACUNIT, // height 0, // display offset 4, // mass diff --git a/src/p_mobj.c b/src/p_mobj.c index c6847df307..ddb36afa5c 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -7379,16 +7379,18 @@ void P_MobjThinker(mobj_t *mobj) return; } mobj->frame = (mobj->frame & ~FF_FRAMEMASK)|(mobj->target->frame & FF_FRAMEMASK); +#if 0 if (mobj->angle != mobj->target->angle + ANGLE_90) // reposition if not the correct angle { mobj_t *target = mobj->target; // shortcut - const fixed_t baseradius = target->radius/2 - FixedMul(FRACUNIT, target->scale); + const fixed_t baseradius = target->radius - (target->scale/4); //FixedMul(FRACUNIT/4, target->scale); P_UnsetThingPosition(mobj); mobj->x = target->x - P_ReturnThrustX(target, target->angle, baseradius); mobj->y = target->y - P_ReturnThrustY(target, target->angle, baseradius); P_SetThingPosition(mobj); mobj->angle = target->angle + ANGLE_90; } +#endif break; case MT_FALLINGROCK: // Despawn rocks here in case zmovement code can't do so (blame slopes) @@ -10146,7 +10148,7 @@ ML_NOCLIMB : Direction not controllable // spawn base { const angle_t mobjangle = FixedAngle(mthing->angle*FRACUNIT); // the mobj's own angle hasn't been set quite yet so... - const fixed_t baseradius = mobj->radius - FixedMul(mobjinfo[MT_WALLSPIKEBASE].radius, mobj->scale); + const fixed_t baseradius = mobj->radius - (mobj->scale/4); //FixedMul(FRACUNIT/4, mobj->scale); mobj_t *base = P_SpawnMobj( mobj->x - P_ReturnThrustX(mobj, mobjangle, baseradius), mobj->y - P_ReturnThrustY(mobj, mobjangle, baseradius), -- GitLab