mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Correct the baseradius stuff. (Still doing some other work, though - will let you know when the branch is safe to review.)
This commit is contained in:
parent
66d59efddc
commit
6d43fad098
2 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue