Set mobj->floorrover and ceilingrover in appropriate places
This commit is contained in:
parent
0d88f31bbd
commit
a6f959ba21
|
@ -396,6 +396,8 @@ static int mobj_set(lua_State *L)
|
||||||
P_CheckPosition(mo, mo->x, mo->y);
|
P_CheckPosition(mo, mo->x, mo->y);
|
||||||
mo->floorz = tmfloorz;
|
mo->floorz = tmfloorz;
|
||||||
mo->ceilingz = tmceilingz;
|
mo->ceilingz = tmceilingz;
|
||||||
|
mo->floorrover = tmfloorrover;
|
||||||
|
mo->ceilingrover = tmceilingrover;
|
||||||
P_SetTarget(&tmthing, ptmthing);
|
P_SetTarget(&tmthing, ptmthing);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -439,6 +441,8 @@ static int mobj_set(lua_State *L)
|
||||||
P_CheckPosition(mo, mo->x, mo->y);
|
P_CheckPosition(mo, mo->x, mo->y);
|
||||||
mo->floorz = tmfloorz;
|
mo->floorz = tmfloorz;
|
||||||
mo->ceilingz = tmceilingz;
|
mo->ceilingz = tmceilingz;
|
||||||
|
mo->floorrover = tmfloorrover;
|
||||||
|
mo->ceilingrover = tmceilingrover;
|
||||||
P_SetTarget(&tmthing, ptmthing);
|
P_SetTarget(&tmthing, ptmthing);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -451,6 +455,8 @@ static int mobj_set(lua_State *L)
|
||||||
P_CheckPosition(mo, mo->x, mo->y);
|
P_CheckPosition(mo, mo->x, mo->y);
|
||||||
mo->floorz = tmfloorz;
|
mo->floorz = tmfloorz;
|
||||||
mo->ceilingz = tmceilingz;
|
mo->ceilingz = tmceilingz;
|
||||||
|
mo->floorrover = tmfloorrover;
|
||||||
|
mo->ceilingrover = tmceilingrover;
|
||||||
P_SetTarget(&tmthing, ptmthing);
|
P_SetTarget(&tmthing, ptmthing);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -326,6 +326,7 @@ void P_InternalFlickyHop(mobj_t *actor, fixed_t momz, fixed_t momh, angle_t angl
|
||||||
extern boolean floatok;
|
extern boolean floatok;
|
||||||
extern fixed_t tmfloorz;
|
extern fixed_t tmfloorz;
|
||||||
extern fixed_t tmceilingz;
|
extern fixed_t tmceilingz;
|
||||||
|
extern ffloor_t *tmfloorrover, *tmceilingrover;
|
||||||
extern mobj_t *tmfloorthing, *tmhitthing, *tmthing;
|
extern mobj_t *tmfloorthing, *tmhitthing, *tmthing;
|
||||||
extern camera_t *mapcampointer;
|
extern camera_t *mapcampointer;
|
||||||
extern fixed_t tmx;
|
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->floorz = tmfloorz;
|
||||||
thing->ceilingz = tmceilingz;
|
thing->ceilingz = tmceilingz;
|
||||||
|
thing->floorrover = tmfloorrover;
|
||||||
|
thing->ceilingrover = tmceilingrover;
|
||||||
|
|
||||||
return true;
|
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)
|
if (thingtop == thing->ceilingz && tmceilingz > thingtop && tmceilingz - thingtop <= maxstep)
|
||||||
{
|
{
|
||||||
thing->z = (thing->ceilingz = thingtop = tmceilingz) - thing->height;
|
thing->z = (thing->ceilingz = thingtop = tmceilingz) - thing->height;
|
||||||
|
thing->ceilingrover = tmceilingrover;
|
||||||
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
||||||
}
|
}
|
||||||
#ifdef ESLOPE
|
#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)
|
else if (tmceilingslope && tmceilingz < thingtop && thingtop - tmceilingz <= maxstep)
|
||||||
{
|
{
|
||||||
thing->z = (thing->ceilingz = thingtop = tmceilingz) - thing->height;
|
thing->z = (thing->ceilingz = thingtop = tmceilingz) - thing->height;
|
||||||
|
thing->ceilingrover = tmceilingrover;
|
||||||
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
||||||
}
|
}
|
||||||
#endif
|
#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)
|
else if (thing->z == thing->floorz && tmfloorz < thing->z && thing->z - tmfloorz <= maxstep)
|
||||||
{
|
{
|
||||||
thing->z = thing->floorz = tmfloorz;
|
thing->z = thing->floorz = tmfloorz;
|
||||||
|
thing->floorrover = tmfloorrover;
|
||||||
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
||||||
}
|
}
|
||||||
#ifdef ESLOPE
|
#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)
|
else if (tmfloorslope && tmfloorz > thing->z && tmfloorz - thing->z <= maxstep)
|
||||||
{
|
{
|
||||||
thing->z = thing->floorz = tmfloorz;
|
thing->z = thing->floorz = tmfloorz;
|
||||||
|
thing->floorrover = tmfloorrover;
|
||||||
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
thing->eflags |= MFE_JUSTSTEPPEDDOWN;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2577,6 +2583,8 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
|
||||||
|
|
||||||
thing->floorz = tmfloorz;
|
thing->floorz = tmfloorz;
|
||||||
thing->ceilingz = tmceilingz;
|
thing->ceilingz = tmceilingz;
|
||||||
|
thing->floorrover = tmfloorrover;
|
||||||
|
thing->ceilingrover = tmceilingrover;
|
||||||
|
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
if (!(thing->flags & MF_NOCLIPHEIGHT))
|
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->floorz = tmfloorz;
|
||||||
thing->ceilingz = tmceilingz;
|
thing->ceilingz = tmceilingz;
|
||||||
|
thing->floorrover = tmfloorrover;
|
||||||
|
thing->ceilingrover = tmceilingrover;
|
||||||
thing->x = x;
|
thing->x = x;
|
||||||
thing->y = y;
|
thing->y = y;
|
||||||
|
|
||||||
|
|
|
@ -8027,6 +8027,8 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
return;
|
return;
|
||||||
mobj->floorz = tmfloorz;
|
mobj->floorz = tmfloorz;
|
||||||
mobj->ceilingz = tmceilingz;
|
mobj->ceilingz = tmceilingz;
|
||||||
|
mobj->floorrover = tmfloorrover;
|
||||||
|
mobj->ceilingrover = tmceilingrover;
|
||||||
|
|
||||||
if ((mobj->eflags & MFE_UNDERWATER) && mobj->health > 0)
|
if ((mobj->eflags & MFE_UNDERWATER) && mobj->health > 0)
|
||||||
{
|
{
|
||||||
|
@ -8545,6 +8547,8 @@ void P_SceneryThinker(mobj_t *mobj)
|
||||||
return;
|
return;
|
||||||
mobj->floorz = tmfloorz;
|
mobj->floorz = tmfloorz;
|
||||||
mobj->ceilingz = tmceilingz;
|
mobj->ceilingz = tmceilingz;
|
||||||
|
mobj->floorrover = tmfloorrover;
|
||||||
|
mobj->ceilingrover = tmceilingrover;
|
||||||
}
|
}
|
||||||
else
|
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);
|
P_CheckPosition(mo, mo->x + momx, mo->y + momy);
|
||||||
mo->floorz = tmfloorz;
|
mo->floorz = tmfloorz;
|
||||||
mo->ceilingz = tmceilingz;
|
mo->ceilingz = tmceilingz;
|
||||||
|
mo->floorrover = tmfloorrover;
|
||||||
|
mo->ceilingrover = tmceilingrover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue