mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-04 19:20:53 +00:00
- Fixed: the dropoff detection code needs to be aware of extra floors.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@882 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
f474931ea8
commit
ab92845b8b
1 changed files with 28 additions and 2 deletions
|
@ -655,8 +655,34 @@ bool PIT_CheckLine (line_t *ld, const FBoundingBox &box, FCheckPosition &tm)
|
||||||
if (!(tm.thing->flags & MF_DROPOFF) &&
|
if (!(tm.thing->flags & MF_DROPOFF) &&
|
||||||
!(tm.thing->flags & (MF_NOGRAVITY|MF_NOCLIP)))
|
!(tm.thing->flags & (MF_NOGRAVITY|MF_NOCLIP)))
|
||||||
{
|
{
|
||||||
if (ld->frontsector->floorplane.c < STEEPSLOPE ||
|
secplane_t *frontplane = &ld->frontsector->floorplane;
|
||||||
ld->backsector->floorplane.c < STEEPSLOPE)
|
secplane_t *backplane = &ld->backsector->floorplane;
|
||||||
|
#ifdef _3DFLOORS
|
||||||
|
// Check 3D floors as well
|
||||||
|
static secplane_t copyplane;
|
||||||
|
sector_t *floorsector = NULL;
|
||||||
|
secplane_t **changeplane = NULL;
|
||||||
|
for (floorsector = ld->frontsector, changeplane = &frontplane;
|
||||||
|
floorsector != ld->backsector;
|
||||||
|
floorsector = ld->backsector, changeplane = &backplane)
|
||||||
|
{
|
||||||
|
if (floorsector->e) // apparently this can be called when the data is already gone-
|
||||||
|
for(unsigned int i=0;i<floorsector->e->XFloor.ffloors.Size();i++)
|
||||||
|
{
|
||||||
|
F3DFloor * rover= floorsector->e->XFloor.ffloors[i];
|
||||||
|
if(!(rover->flags & FF_SOLID) || !(rover->flags & FF_EXISTS)) continue;
|
||||||
|
|
||||||
|
if (rover->top.plane->ZatPoint(tm.thing->x, tm.thing->y) == tm.thing->floorz)
|
||||||
|
{
|
||||||
|
copyplane = *rover->top.plane;
|
||||||
|
if (copyplane.c<0) copyplane.FlipVert();
|
||||||
|
*changeplane = ©plane;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (frontplane->c < STEEPSLOPE || backplane->c < STEEPSLOPE)
|
||||||
{
|
{
|
||||||
const msecnode_t *node = tm.thing->touching_sectorlist;
|
const msecnode_t *node = tm.thing->touching_sectorlist;
|
||||||
bool allow = false;
|
bool allow = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue