mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'horizon-line-update' into 'master'
Horizon line apply to FOFs backport See merge request KartKrew/Kart!225
This commit is contained in:
commit
5dad8d125a
3 changed files with 20 additions and 7 deletions
|
|
@ -2023,7 +2023,7 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
|
|||
// Single sided line... Deal only with the middletexture (if one exists)
|
||||
gr_midtexture = R_GetTextureNum(gr_sidedef->midtexture);
|
||||
if (gr_midtexture
|
||||
&& gr_linedef->special != 41) // Ignore horizon line for OGL
|
||||
&& gr_linedef->special != HORIZONSPECIAL) // Ignore horizon line for OGL
|
||||
{
|
||||
{
|
||||
fixed_t texturevpeg;
|
||||
|
|
|
|||
|
|
@ -406,6 +406,8 @@ typedef enum
|
|||
ST_NEGATIVE
|
||||
} slopetype_t;
|
||||
|
||||
#define HORIZONSPECIAL 41
|
||||
|
||||
typedef struct line_s
|
||||
{
|
||||
// Vertices, from v1 to v2.
|
||||
|
|
|
|||
23
src/r_segs.c
23
src/r_segs.c
|
|
@ -2687,7 +2687,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
worldbottomslope >>= 4;
|
||||
#endif
|
||||
|
||||
if (linedef->special == 41) { // HORIZON LINES
|
||||
if (linedef->special == HORIZONSPECIAL) { // HORIZON LINES
|
||||
topstep = bottomstep = 0;
|
||||
topfrac = bottomfrac = (centeryfrac>>4);
|
||||
topfrac++; // Prevent 1px HOM
|
||||
|
|
@ -2817,12 +2817,23 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
|||
ffloor[i].f_pos >>= 4;
|
||||
#ifdef ESLOPE
|
||||
ffloor[i].f_pos_slope >>= 4;
|
||||
ffloor[i].f_frac = (centeryfrac>>4) - FixedMul(ffloor[i].f_pos, rw_scale);
|
||||
ffloor[i].f_step = ((centeryfrac>>4) - FixedMul(ffloor[i].f_pos_slope, ds_p->scale2) - ffloor[i].f_frac)/(range);
|
||||
#else
|
||||
ffloor[i].f_step = FixedMul(-rw_scalestep, ffloor[i].f_pos);
|
||||
ffloor[i].f_frac = (centeryfrac>>4) - FixedMul(ffloor[i].f_pos, rw_scale);
|
||||
#endif
|
||||
if (linedef->special == HORIZONSPECIAL) // Horizon lines extend FOFs in contact with them too.
|
||||
{
|
||||
ffloor[i].f_step = 0;
|
||||
ffloor[i].f_frac = (centeryfrac>>4);
|
||||
topfrac++; // Prevent 1px HOM
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef ESLOPE
|
||||
ffloor[i].f_frac = (centeryfrac>>4) - FixedMul(ffloor[i].f_pos, rw_scale);
|
||||
ffloor[i].f_step = ((centeryfrac>>4) - FixedMul(ffloor[i].f_pos_slope, ds_p->scale2) - ffloor[i].f_frac)/(range);
|
||||
#else
|
||||
ffloor[i].f_step = FixedMul(-rw_scalestep, ffloor[i].f_pos);
|
||||
ffloor[i].f_frac = (centeryfrac>>4) - FixedMul(ffloor[i].f_pos, rw_scale);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue