mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- make distance check 3D and use proper viewpoint.
This commit is contained in:
parent
efce248a98
commit
37f43617d9
1 changed files with 1 additions and 1 deletions
|
@ -342,7 +342,7 @@ static inline void RenderThings(subsector_t * sub, sector_t * sector)
|
||||||
FIntCVar *cvar = thing->GetClass()->distancecheck;
|
FIntCVar *cvar = thing->GetClass()->distancecheck;
|
||||||
if (cvar != NULL && *cvar >= 0)
|
if (cvar != NULL && *cvar >= 0)
|
||||||
{
|
{
|
||||||
double dist = thing->Distance2DSquared(camera);
|
double dist = (thing->PosRelative(viewsector) - ViewPos).LengthSquared();
|
||||||
double check = (double)**cvar;
|
double check = (double)**cvar;
|
||||||
if (dist >= check * check)
|
if (dist >= check * check)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue