mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 23:12:24 +00:00
GL renderer now uses RenderRadius links too
This commit is contained in:
parent
19856d6ccb
commit
6f16597668
1 changed files with 17 additions and 11 deletions
|
@ -363,20 +363,26 @@ static inline void RenderThings(subsector_t * sub, sector_t * sector)
|
||||||
SetupSprite.Clock();
|
SetupSprite.Clock();
|
||||||
sector_t * sec=sub->sector;
|
sector_t * sec=sub->sector;
|
||||||
// Handle all things in sector.
|
// Handle all things in sector.
|
||||||
for (AActor * thing = sec->thinglist; thing; thing = thing->snext)
|
if (sec->touching_render_things)
|
||||||
{
|
{
|
||||||
FIntCVar *cvar = thing->GetClass()->distancecheck;
|
for (auto thing : *sec->touching_render_things)
|
||||||
if (cvar != NULL && *cvar >= 0)
|
|
||||||
{
|
{
|
||||||
double dist = (thing->Pos() - ViewPos).LengthSquared();
|
if (thing->validcount == validcount) continue;
|
||||||
double check = (double)**cvar;
|
thing->validcount = validcount;
|
||||||
if (dist >= check * check)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GLRenderer->ProcessSprite(thing, sector, false);
|
FIntCVar *cvar = thing->GetClass()->distancecheck;
|
||||||
|
if (cvar != NULL && *cvar >= 0)
|
||||||
|
{
|
||||||
|
double dist = (thing->Pos() - ViewPos).LengthSquared();
|
||||||
|
double check = (double)**cvar;
|
||||||
|
if (dist >= check * check)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GLRenderer->ProcessSprite(thing, sector, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (msecnode_t *node = sec->render_thinglist; node; node = node->m_snext)
|
for (msecnode_t *node = sec->render_thinglist; node; node = node->m_snext)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue