mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
Set mobj->floorrover and ceilingrover in appropriate places
This commit is contained in:
parent
0d88f31bbd
commit
a6f959ba21
5 changed files with 23 additions and 0 deletions
|
@ -396,6 +396,8 @@ static int mobj_set(lua_State *L)
|
|||
P_CheckPosition(mo, mo->x, mo->y);
|
||||
mo->floorz = tmfloorz;
|
||||
mo->ceilingz = tmceilingz;
|
||||
mo->floorrover = tmfloorrover;
|
||||
mo->ceilingrover = tmceilingrover;
|
||||
P_SetTarget(&tmthing, ptmthing);
|
||||
break;
|
||||
}
|
||||
|
@ -439,6 +441,8 @@ static int mobj_set(lua_State *L)
|
|||
P_CheckPosition(mo, mo->x, mo->y);
|
||||
mo->floorz = tmfloorz;
|
||||
mo->ceilingz = tmceilingz;
|
||||
mo->floorrover = tmfloorrover;
|
||||
mo->ceilingrover = tmceilingrover;
|
||||
P_SetTarget(&tmthing, ptmthing);
|
||||
break;
|
||||
}
|
||||
|
@ -451,6 +455,8 @@ static int mobj_set(lua_State *L)
|
|||
P_CheckPosition(mo, mo->x, mo->y);
|
||||
mo->floorz = tmfloorz;
|
||||
mo->ceilingz = tmceilingz;
|
||||
mo->floorrover = tmfloorrover;
|
||||
mo->ceilingrover = tmceilingrover;
|
||||
P_SetTarget(&tmthing, ptmthing);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -326,6 +326,7 @@ void P_InternalFlickyHop(mobj_t *actor, fixed_t momz, fixed_t momh, angle_t angl
|
|||
extern boolean floatok;
|
||||
extern fixed_t tmfloorz;
|
||||
extern fixed_t tmceilingz;
|
||||
extern ffloor_t *tmfloorrover, *tmceilingrover;
|
||||
extern mobj_t *tmfloorthing, *tmhitthing, *tmthing;
|
||||
extern camera_t *mapcampointer;
|
||||
extern fixed_t tmx;
|
||||
|
|
10
src/p_map.c
10
src/p_map.c
|
@ -102,6 +102,8 @@ boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z)
|
|||
|
||||
thing->floorz = tmfloorz;
|
||||
thing->ceilingz = tmceilingz;
|
||||
thing->floorrover = tmfloorrover;
|
||||
thing->ceilingrover = tmceilingrover;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2485,6 +2487,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
if (thingtop == thing->ceilingz && tmceilingz > thingtop && tmceilingz - thingtop <= maxstep)
|
||||
{
|
||||
thing->z = (thing->ceilingz = thingtop = tmceilingz) - thing->height;
|
||||
thing->ceilingrover = tmceilingrover;
|
||||
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
||||
}
|
||||
#ifdef ESLOPE
|
||||
|
@ -2492,6 +2495,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
else if (tmceilingslope && tmceilingz < thingtop && thingtop - tmceilingz <= maxstep)
|
||||
{
|
||||
thing->z = (thing->ceilingz = thingtop = tmceilingz) - thing->height;
|
||||
thing->ceilingrover = tmceilingrover;
|
||||
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
||||
}
|
||||
#endif
|
||||
|
@ -2499,6 +2503,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
else if (thing->z == thing->floorz && tmfloorz < thing->z && thing->z - tmfloorz <= maxstep)
|
||||
{
|
||||
thing->z = thing->floorz = tmfloorz;
|
||||
thing->floorrover = tmfloorrover;
|
||||
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
||||
}
|
||||
#ifdef ESLOPE
|
||||
|
@ -2506,6 +2511,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
else if (tmfloorslope && tmfloorz > thing->z && tmfloorz - thing->z <= maxstep)
|
||||
{
|
||||
thing->z = thing->floorz = tmfloorz;
|
||||
thing->floorrover = tmfloorrover;
|
||||
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
||||
}
|
||||
#endif
|
||||
|
@ -2577,6 +2583,8 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
|||
|
||||
thing->floorz = tmfloorz;
|
||||
thing->ceilingz = tmceilingz;
|
||||
thing->floorrover = tmfloorrover;
|
||||
thing->ceilingrover = tmceilingrover;
|
||||
|
||||
#ifdef ESLOPE
|
||||
if (!(thing->flags & MF_NOCLIPHEIGHT))
|
||||
|
@ -2657,6 +2665,8 @@ boolean P_SceneryTryMove(mobj_t *thing, fixed_t x, fixed_t y)
|
|||
|
||||
thing->floorz = tmfloorz;
|
||||
thing->ceilingz = tmceilingz;
|
||||
thing->floorrover = tmfloorrover;
|
||||
thing->ceilingrover = tmceilingrover;
|
||||
thing->x = x;
|
||||
thing->y = y;
|
||||
|
||||
|
|
|
@ -8027,6 +8027,8 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
return;
|
||||
mobj->floorz = tmfloorz;
|
||||
mobj->ceilingz = tmceilingz;
|
||||
mobj->floorrover = tmfloorrover;
|
||||
mobj->ceilingrover = tmceilingrover;
|
||||
|
||||
if ((mobj->eflags & MFE_UNDERWATER) && mobj->health > 0)
|
||||
{
|
||||
|
@ -8545,6 +8547,8 @@ void P_SceneryThinker(mobj_t *mobj)
|
|||
return;
|
||||
mobj->floorz = tmfloorz;
|
||||
mobj->ceilingz = tmceilingz;
|
||||
mobj->floorrover = tmfloorrover;
|
||||
mobj->ceilingrover = tmceilingrover;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -985,6 +985,8 @@ static void Polyobj_pushThing(polyobj_t *po, line_t *line, mobj_t *mo)
|
|||
P_CheckPosition(mo, mo->x + momx, mo->y + momy);
|
||||
mo->floorz = tmfloorz;
|
||||
mo->ceilingz = tmceilingz;
|
||||
mo->floorrover = tmfloorrover;
|
||||
mo->ceilingrover = tmceilingrover;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue