mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-12 21:01:00 +00:00
Part 2 of fix, make sure copied slopes also pass on hasslope status to attached target sectors for FOFs
Also fix whitespace to use tab-style spaces instead of regular spaces, ew
This commit is contained in:
parent
50e8f13c03
commit
1638fad75e
1 changed files with 18 additions and 13 deletions
|
@ -584,23 +584,28 @@ static pslope_t *P_NewVertexSlope(INT16 tag1, INT16 tag2, INT16 tag3, UINT8 flag
|
|||
//
|
||||
void P_CopySectorSlope(line_t *line)
|
||||
{
|
||||
sector_t *fsec = line->frontsector;
|
||||
int i, special = line->special;
|
||||
sector_t *fsec = line->frontsector;
|
||||
int i, special = line->special;
|
||||
|
||||
// Check for copy linedefs
|
||||
for(i = -1; (i = P_FindSectorFromLineTag(line, i)) >= 0;)
|
||||
{
|
||||
sector_t *srcsec = sectors + i;
|
||||
// Check for copy linedefs
|
||||
for (i = -1; (i = P_FindSectorFromLineTag(line, i)) >= 0;)
|
||||
{
|
||||
sector_t *srcsec = sectors + i;
|
||||
|
||||
if((special - 719) & 1 && !fsec->f_slope && srcsec->f_slope)
|
||||
fsec->f_slope = srcsec->f_slope; //P_CopySlope(srcsec->f_slope);
|
||||
if((special - 719) & 2 && !fsec->c_slope && srcsec->c_slope)
|
||||
fsec->c_slope = srcsec->c_slope; //P_CopySlope(srcsec->c_slope);
|
||||
}
|
||||
if ((special - 719) & 1 && !fsec->f_slope && srcsec->f_slope)
|
||||
fsec->f_slope = srcsec->f_slope; //P_CopySlope(srcsec->f_slope);
|
||||
if ((special - 719) & 2 && !fsec->c_slope && srcsec->c_slope)
|
||||
fsec->c_slope = srcsec->c_slope; //P_CopySlope(srcsec->c_slope);
|
||||
}
|
||||
|
||||
fsec->hasslope = true;
|
||||
fsec->hasslope = true;
|
||||
|
||||
line->special = 0; // Linedef was use to set slopes, it finished its job, so now make it a normal linedef
|
||||
// if this is an FOF control sector, make sure any target sectors also are marked as having slopes
|
||||
if (fsec->numattached)
|
||||
for (i = 0; i < fsec->numattached; i++)
|
||||
sectors[fsec->attached[i]].hasslope = true;
|
||||
|
||||
line->special = 0; // Linedef was use to set slopes, it finished its job, so now make it a normal linedef
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue