mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 03:52:12 -04:00
limit max distance for vissprites to 8192 map units as before
But don't rely on an integer overflow this time. This increases FPS from 9 to 28 in the opening scene of comatose.wad
This commit is contained in:
parent
5f3d6a15fb
commit
14ed02e08d
@ -47,6 +47,7 @@
|
|||||||
#include "z_zone.h"
|
#include "z_zone.h"
|
||||||
|
|
||||||
#define MINZ (FRACUNIT*4)
|
#define MINZ (FRACUNIT*4)
|
||||||
|
#define MAXZ (FRACUNIT*8192)
|
||||||
#define BASEYCENTER 100
|
#define BASEYCENTER 100
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -539,7 +540,7 @@ void R_ProjectSprite (mobj_t* thing)
|
|||||||
tz = gxt-gyt;
|
tz = gxt-gyt;
|
||||||
|
|
||||||
// thing is behind view plane?
|
// thing is behind view plane?
|
||||||
if (tz < MINZ)
|
if (tz < MINZ || tz > MAXZ)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xscale = FixedDiv(projection, tz);
|
xscale = FixedDiv(projection, tz);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user