From 0f7fce8bbb166539079837126ddddeab7ff967ae Mon Sep 17 00:00:00 2001
From: Christoph Oelckers <c.oelckers@zdoom.fake>
Date: Wed, 13 Apr 2016 19:32:54 +0200
Subject: [PATCH] - removed portal offsetting from the sprite distance check.

This isn't necessary. When rendering no actors from other groups may ever come into view directly - only when the respective part of the level is rendered through a portal. But at that point the camera is in a position where it's already correctly placed with relation to that actor.
---
 src/r_things.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/r_things.cpp b/src/r_things.cpp
index cc490e6b0..95b40916e 100644
--- a/src/r_things.cpp
+++ b/src/r_things.cpp
@@ -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->PosRelative(viewsector) - ViewPos).LengthSquared();
+			double dist = (thing->Pos() - ViewPos).LengthSquared();
 			double check = (double)**cvar;
 			if (dist >= check * check)
 			{