- added support for distancecheck property.

This commit is contained in:
Christoph Oelckers 2016-04-12 19:50:29 +02:00
parent a1a022581d
commit bec3208efd

View file

@ -339,6 +339,17 @@ static inline void RenderThings(subsector_t * sub, sector_t * sector)
// Handle all things in sector. // Handle all things in sector.
for (AActor * thing = sec->thinglist; thing; thing = thing->snext) for (AActor * thing = sec->thinglist; thing; thing = thing->snext)
{ {
FIntCVar *cvar = thing->GetClass()->distancecheck;
if (cvar != NULL && *cvar >= 0)
{
double dist = thing->Distance2DSquared(camera);
double check = (double)**cvar;
if (dist >= check * check)
{
continue;
}
}
GLRenderer->ProcessSprite(thing, sector); GLRenderer->ProcessSprite(thing, sector);
} }
} }