diff --git a/src/r_things.c b/src/r_things.c index ee929684..bc363392 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -47,6 +47,7 @@ #include "z_zone.h" #define MINZ (FRACUNIT*4) +#define MAXZ (FRACUNIT*8192) #define BASEYCENTER 100 typedef struct { @@ -539,7 +540,7 @@ void R_ProjectSprite (mobj_t* thing) tz = gxt-gyt; // thing is behind view plane? - if (tz < MINZ) + if (tz < MINZ || tz > MAXZ) return; xscale = FixedDiv(projection, tz);