mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Fix wall spikes being harmful from below, set initial destscale of base too just in case
This commit is contained in:
parent
eacf753f2c
commit
444e9ce7df
2 changed files with 3 additions and 2 deletions
|
@ -969,7 +969,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
else
|
||||
topz += FixedMul(FRACUNIT, tmthing->scale);
|
||||
|
||||
if (thing->z + thing->height >= bottomz // above bottom
|
||||
if (thing->z + thing->height > bottomz // above bottom
|
||||
&& thing->z < topz) // below top
|
||||
{ // don't check angle, the player was clearly in the way in this case
|
||||
P_DamageMobj(thing, tmthing, tmthing, 1, DMG_SPIKE);
|
||||
|
@ -985,7 +985,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
else
|
||||
topz += FixedMul(FRACUNIT, thing->scale);
|
||||
|
||||
if (tmthing->z + tmthing->height >= bottomz // above bottom
|
||||
if (tmthing->z + tmthing->height > bottomz // above bottom
|
||||
&& tmthing->z < topz // below top
|
||||
&& !P_MobjWasRemoved(thing->tracer)) // this probably wouldn't work if we didn't have a tracer
|
||||
{ // use base as a reference point to determine what angle you touched the spike at
|
||||
|
|
|
@ -8484,6 +8484,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
|||
mobj->y - P_ReturnThrustY(mobj, mobj->angle, mobj->radius/2 - FixedMul(FRACUNIT, mobj->scale)),
|
||||
mobj->z, MT_WALLSPIKEBASE);
|
||||
base->angle = mobj->angle + ANGLE_90;
|
||||
base->destscale = mobj->destscale;
|
||||
P_SetScale(base, mobj->scale);
|
||||
P_SetTarget(&base->target, mobj);
|
||||
P_SetTarget(&mobj->tracer, base);
|
||||
|
|
Loading…
Reference in a new issue