Actually remove the entire code block in T_MovePlane(), and remove line_t.tagline as it served no other purpose.

This commit is contained in:
Nev3r 2020-04-13 15:17:53 +02:00
parent 711c35970c
commit 74bd23c275
4 changed files with 0 additions and 109 deletions

View File

@ -48,8 +48,6 @@ result_e T_MovePlane(sector_t *sector, fixed_t speed, fixed_t dest, boolean crus
boolean flag;
fixed_t lastpos;
fixed_t destheight; // used to keep floors/ceilings from moving through each other
mobj_t *mo = NULL;
sector->moved = true;
switch (floorOrCeiling)
@ -187,105 +185,6 @@ result_e T_MovePlane(sector_t *sector, fixed_t speed, fixed_t dest, boolean crus
break;
}
// If this is an FOF being checked, check all the affected sectors for moving mobjs.
if (sector->tagline)
{
boolean sectorisquicksand = false;
sector_t *sec;
ffloor_t *rover;
INT32 secnum;
while (secnum = P_FindSectorFromLineTag(sector->tagline, secnum) >= 0)
{
// Get actual sector from the list of sectors.
sec = &sectors[secnum];
if (!sec->thinglist)
continue;
// Can't use P_InQuicksand because it will return the incorrect result
// because of checking for heights.
for (rover = sec->ffloors; rover; rover = rover->next)
{
if (rover->target == sec && (rover->flags & FF_QUICKSAND))
{
sectorisquicksand = true;
break;
}
}
for (mo = sec->thinglist; mo; mo = mo->snext)
{
// The object should be ready to move as defined by this function.
if (!P_MobjReadyToMove(mo, sec, true, sectorisquicksand))
continue;
// The object should not be moving at all.
if (mo->momx || mo->momy || mo->momz)
continue;
// These objects will be affected by this condition.
switch (mo->type)
{
case MT_GOOP: // Egg Slimer's goop objects
case MT_SPINFIRE: // Elemental Shield flame balls
case MT_SPIKE: // Floor Spike
// Is the object hang from the ceiling?
// In that case, swap the planes used.
// verticalflip inverts
if (!!(mo->flags & MF_SPAWNCEILING) ^ !!(mo->eflags & MFE_VERTICALFLIP))
{
if (!sectorisquicksand)
mo->z = mo->ceilingz - mo->height;
else
mo->z = mo->ceilingz = mo->subsector->sector->ceilingheight - mo->height;
}
else
{
if (!sectorisquicksand)
mo->z = mo->floorz;
else
mo->z = mo->floorz = mo->subsector->sector->floorheight;
}
break;
default:
break;
}
}
}
}
// Only run the logic if there is any mobjs in the sector.
if (sector->thinglist)
for (mo = sector->thinglist; mo; mo = mo->snext)
{
// The object should be ready to move as defined by this function.
if (!P_MobjReadyToMove(mo, sector, false, false))
continue;
// The object should not be moving at all.
if (mo->momx || mo->momy || mo->momz)
continue;
// These objects will be affected by this condition.
switch (mo->type)
{
case MT_GOOP: // Egg Slimer's goop objects
case MT_SPINFIRE: // Elemental Shield flame balls
case MT_SPIKE: // Floor Spike
// Is the object hang from the ceiling?
// In that case, swap the planes used.
// verticalflip inverts
if (!!(mo->flags & MF_SPAWNCEILING) ^ !!(mo->eflags & MFE_VERTICALFLIP))
mo->z = mo->ceilingz = mo->subsector->sector->ceilingheight - mo->height;
else
mo->z = mo->floorz = mo->subsector->sector->floorheight;
break;
default:
break;
}
}
return ok;
}

View File

@ -872,7 +872,6 @@ static void P_InitializeSector(sector_t *ss)
ss->linecount = 0;
ss->lines = NULL;
ss->tagline = NULL;
ss->ffloors = NULL;
ss->attached = NULL;

View File

@ -5772,8 +5772,6 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, f
sec2->floorheight = tempceiling;
}
sec2->tagline = master;
if (sec2->numattached == 0)
{
sec2->attached = Z_Malloc(sizeof (*sec2->attached) * sec2->maxattached, PU_STATIC, NULL);

View File

@ -328,11 +328,6 @@ typedef struct sector_s
size_t linecount;
struct line_s **lines; // [linecount] size
// Hack: store special line tagging to some sectors
// to efficiently help work around bugs by directly
// referencing the specific line that the problem happens in.
// (used in T_MovePlane mobj physics)
struct line_s *tagline;
// Improved fake floor hack
ffloor_t *ffloors;