- make distancecheck 3D and use the actual view position for calculation.
This commit is contained in:
parent
45cfea17f5
commit
d88a5ac353
3 changed files with 7 additions and 2 deletions
|
|
@ -1248,7 +1248,7 @@ void R_AddSprites (sector_t *sec, int lightlevel, int fakeside)
|
|||
FIntCVar *cvar = thing->GetClass()->distancecheck;
|
||||
if (cvar != NULL && *cvar >= 0)
|
||||
{
|
||||
double dist = thing->Distance2DSquared(camera);
|
||||
double dist = (thing->PosRelative(viewsector) - ViewPos).LengthSquared();
|
||||
double check = (double)**cvar;
|
||||
if (dist >= check * check)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue