Merge branch 'raisethinker' into udmf-fofs-mkii

# Conflicts:
#	src/p_spec.c
This commit is contained in:
MascaraSnake 2020-04-27 11:32:51 +02:00
commit 0877427168

View file

@ -6023,7 +6023,7 @@ static void P_AddBlockThinker(sector_t *sec, line_t *sourceline)
* \sa P_SpawnSpecials, T_RaiseSector
* \author SSNTails <http://www.ssntails.org>
*/
static void P_AddRaiseThinker(sector_t *sec, line_t *sourceline, boolean lower, boolean spindash)
static void P_AddRaiseThinker(sector_t *sec, line_t *sourceline, fixed_t speed, fixed_t ceilingtop, fixed_t ceilingbottom, boolean lower, boolean spindash)
{
raise_t *raise;
@ -6035,10 +6035,10 @@ static void P_AddRaiseThinker(sector_t *sec, line_t *sourceline, boolean lower,
raise->sourceline = sourceline;
raise->sector = sec;
raise->ceilingtop = P_FindHighestCeilingSurrounding(sec);
raise->ceilingbottom = P_FindLowestCeilingSurrounding(sec);
raise->ceilingtop = ceilingtop;
raise->ceilingbottom = ceilingbottom;
raise->basespeed = FixedDiv(P_AproxDistance(sourceline->dx, sourceline->dy), 4*FRACUNIT);
raise->basespeed = speed;
if (lower)
raise->flags |= RF_REVERSE;
@ -6826,44 +6826,32 @@ void P_SpawnSpecials(boolean fromnetsave)
break;
case 190: // Rising Platform FOF (solid, opaque, shadows)
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL, secthinkers);
P_AddRaiseThinker(lines[i].frontsector, &lines[i], !!(lines[i].flags & ML_BLOCKMONSTERS), !!(lines[i].flags & ML_NOCLIMB));
break;
case 191: // Rising Platform FOF (solid, opaque, no shadows)
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_NOSHADE|FF_CUTLEVEL, secthinkers);
P_AddRaiseThinker(lines[i].frontsector, &lines[i], !!(lines[i].flags & ML_BLOCKMONSTERS), !!(lines[i].flags & ML_NOCLIMB));
break;
case 192: // Rising Platform TL block: FOF (solid, translucent)
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_NOSHADE|FF_TRANSLUCENT|FF_EXTRA|FF_CUTEXTRA, secthinkers);
P_AddRaiseThinker(lines[i].frontsector, &lines[i], !!(lines[i].flags & ML_BLOCKMONSTERS), !!(lines[i].flags & ML_NOCLIMB));
break;
case 193: // Rising Platform FOF (solid, invisible)
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_NOSHADE, secthinkers);
P_AddRaiseThinker(lines[i].frontsector, &lines[i], !!(lines[i].flags & ML_BLOCKMONSTERS), !!(lines[i].flags & ML_NOCLIMB));
break;
case 194: // Rising Platform 'Platform' - You can jump up through it
// If line has no-climb set, don't give it shadows, otherwise do
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_PLATFORM|FF_BOTHPLANES|FF_ALLSIDES;
if (lines[i].flags & ML_NOCLIMB)
ffloorflags |= FF_NOSHADE;
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
P_AddRaiseThinker(lines[i].frontsector, &lines[i], !!(lines[i].flags & ML_BLOCKMONSTERS), !!(lines[i].flags & ML_NOCLIMB));
break;
case 195: // Rising Platform Translucent "platform"
// If line has no-climb set, don't give it shadows, otherwise do
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_PLATFORM|FF_TRANSLUCENT|FF_BOTHPLANES|FF_ALLSIDES|FF_EXTRA|FF_CUTEXTRA;
if (lines[i].flags & ML_NOCLIMB)
ffloorflags |= FF_NOSHADE;
{
fixed_t speed = FixedDiv(P_AproxDistance(lines[i].dx, lines[i].dy), 4*FRACUNIT);
fixed_t ceilingtop = P_FindHighestCeilingSurrounding(lines[i].frontsector);
fixed_t ceilingbottom = P_FindLowestCeilingSurrounding(lines[i].frontsector);
ffloorflags = FF_EXISTS|FF_SOLID;
if (lines[i].special != 193)
ffloorflags |= FF_RENDERALL;
if (lines[i].special <= 191)
ffloorflags |= FF_CUTLEVEL;
if (lines[i].special == 192 || lines[i].special == 195)
ffloorflags |= FF_TRANSLUCENT|FF_EXTRA|FF_CUTEXTRA;
if (lines[i].special >= 194)
ffloorflags |= FF_PLATFORM|FF_BOTHPLANES|FF_ALLSIDES;
if (lines[i].special != 190 && (lines[i].special <= 193 || lines[i].flags & ML_NOCLIMB))
ffloorflags |= FF_NOSHADE;
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
P_AddRaiseThinker(lines[i].frontsector, &lines[i], !!(lines[i].flags & ML_BLOCKMONSTERS), !!(lines[i].flags & ML_NOCLIMB));
P_AddRaiseThinker(lines[i].frontsector, &lines[i], speed, ceilingtop, ceilingbottom, !!(lines[i].flags & ML_BLOCKMONSTERS), !!(lines[i].flags & ML_NOCLIMB));
break;
}
case 200: // Light block
ffloorflags = FF_EXISTS|FF_CUTSPRITES;