mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Allow GL-specific memoized map properties in all comp modes
This commit is contained in:
parent
e4fc3cc5c2
commit
820fa9b647
3 changed files with 2 additions and 16 deletions
|
|
@ -3683,9 +3683,7 @@ void P_UpdateSegLightOffset(seg_t *li)
|
||||||
|
|
||||||
// Between -2 and 2 for software, -16 and 16 for hardware
|
// Between -2 and 2 for software, -16 and 16 for hardware
|
||||||
li->lightOffset = FixedFloor((extralight / 8) + (FRACUNIT / 2)) / FRACUNIT;
|
li->lightOffset = FixedFloor((extralight / 8) + (FRACUNIT / 2)) / FRACUNIT;
|
||||||
#ifdef HWRENDER
|
|
||||||
li->hwLightOffset = FixedFloor(extralight + (FRACUNIT / 2)) / FRACUNIT;
|
li->hwLightOffset = FixedFloor(extralight + (FRACUNIT / 2)) / FRACUNIT;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean P_SectorUsesDirectionalLighting(const sector_t *sector)
|
boolean P_SectorUsesDirectionalLighting(const sector_t *sector)
|
||||||
|
|
@ -3790,9 +3788,7 @@ static void P_LoadSegs(UINT8 *data)
|
||||||
seg->linedef = &lines[SHORT(ms->linedef)];
|
seg->linedef = &lines[SHORT(ms->linedef)];
|
||||||
|
|
||||||
seg->length = P_SegLength(seg);
|
seg->length = P_SegLength(seg);
|
||||||
#ifdef HWRENDER
|
seg->flength = P_SegLengthFloat(seg);
|
||||||
seg->flength = (rendermode == render_opengl) ? P_SegLengthFloat(seg) : 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
seg->glseg = false;
|
seg->glseg = false;
|
||||||
P_InitializeSeg(seg);
|
P_InitializeSeg(seg);
|
||||||
|
|
@ -4020,9 +4016,7 @@ static boolean P_LoadExtendedSubsectorsAndSegs(UINT8 **data, nodetype_t nodetype
|
||||||
segs[i].offset = FixedHypot(v1->x - v->x, v1->y - v->y);
|
segs[i].offset = FixedHypot(v1->x - v->x, v1->y - v->y);
|
||||||
}
|
}
|
||||||
seg->length = P_SegLength(seg);
|
seg->length = P_SegLength(seg);
|
||||||
#ifdef HWRENDER
|
seg->flength = P_SegLengthFloat(seg);
|
||||||
seg->flength = (rendermode == render_opengl) ? P_SegLengthFloat(seg) : 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -91,9 +91,7 @@ void P_UpdateSlopeLightOffset(pslope_t *slope)
|
||||||
|
|
||||||
// Between -2 and 2 for software, -16 and 16 for hardware
|
// Between -2 and 2 for software, -16 and 16 for hardware
|
||||||
slope->lightOffset = FixedFloor((extralight / 8) + (FRACUNIT / 2)) / FRACUNIT;
|
slope->lightOffset = FixedFloor((extralight / 8) + (FRACUNIT / 2)) / FRACUNIT;
|
||||||
#ifdef HWRENDER
|
|
||||||
slope->hwLightOffset = FixedFloor(extralight + (FRACUNIT / 2)) / FRACUNIT;
|
slope->hwLightOffset = FixedFloor(extralight + (FRACUNIT / 2)) / FRACUNIT;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate line normal
|
// Calculate line normal
|
||||||
|
|
|
||||||
|
|
@ -329,9 +329,7 @@ struct pslope_t
|
||||||
|
|
||||||
// Light offsets (see seg_t)
|
// Light offsets (see seg_t)
|
||||||
SINT8 lightOffset;
|
SINT8 lightOffset;
|
||||||
#ifdef HWRENDER
|
|
||||||
INT16 hwLightOffset;
|
INT16 hwLightOffset;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Per-sector bot controller override
|
// Per-sector bot controller override
|
||||||
|
|
@ -762,14 +760,12 @@ struct seg_t
|
||||||
sector_t *backsector;
|
sector_t *backsector;
|
||||||
|
|
||||||
fixed_t length; // precalculated seg length
|
fixed_t length; // precalculated seg length
|
||||||
#ifdef HWRENDER
|
|
||||||
// new pointers so that AdjustSegs doesn't mess with v1/v2
|
// new pointers so that AdjustSegs doesn't mess with v1/v2
|
||||||
void *pv1; // polyvertex_t
|
void *pv1; // polyvertex_t
|
||||||
void *pv2; // polyvertex_t
|
void *pv2; // polyvertex_t
|
||||||
float flength; // length of the seg, used by hardware renderer
|
float flength; // length of the seg, used by hardware renderer
|
||||||
|
|
||||||
lightmap_t *lightmaps; // for static lightmap
|
lightmap_t *lightmaps; // for static lightmap
|
||||||
#endif
|
|
||||||
|
|
||||||
// Why slow things down by calculating lightlists for every thick side?
|
// Why slow things down by calculating lightlists for every thick side?
|
||||||
size_t numlights;
|
size_t numlights;
|
||||||
|
|
@ -780,9 +776,7 @@ struct seg_t
|
||||||
|
|
||||||
// Fake contrast calculated on level load
|
// Fake contrast calculated on level load
|
||||||
SINT8 lightOffset;
|
SINT8 lightOffset;
|
||||||
#ifdef HWRENDER
|
|
||||||
INT16 hwLightOffset;
|
INT16 hwLightOffset;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue