- move r_utility globals into r_viewpoint and r_viewwindow

- change r_utility functions to only work on FRenderViewpoint and FViewWindow
This commit is contained in:
Magnus Norddahl 2017-03-11 23:28:07 +01:00
commit 0c9014b984
75 changed files with 817 additions and 839 deletions

View file

@ -374,7 +374,7 @@ static inline void RenderThings(subsector_t * sub, sector_t * sector)
FIntCVar *cvar = thing->GetClass()->distancecheck;
if (cvar != NULL && *cvar >= 0)
{
double dist = (thing->Pos() - ViewPos).LengthSquared();
double dist = (thing->Pos() - r_viewpoint.Pos).LengthSquared();
double check = (double)**cvar;
if (dist >= check * check)
{
@ -391,7 +391,7 @@ static inline void RenderThings(subsector_t * sub, sector_t * sector)
FIntCVar *cvar = thing->GetClass()->distancecheck;
if (cvar != NULL && *cvar >= 0)
{
double dist = (thing->Pos() - ViewPos).LengthSquared();
double dist = (thing->Pos() - r_viewpoint.Pos).LengthSquared();
double check = (double)**cvar;
if (dist >= check * check)
{