mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 22:33:17 +00:00
- added support for distancecheck property.
This commit is contained in:
parent
a1a022581d
commit
bec3208efd
1 changed files with 11 additions and 0 deletions
|
@ -339,6 +339,17 @@ static inline void RenderThings(subsector_t * sub, sector_t * sector)
|
|||
// Handle all things in sector.
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue