Polymost: Clear wsprinfo[] upon map load. This should address some remaining instances of wall-ornamented sprite z-fighting.

git-svn-id: https://svn.eduke32.com/eduke32@5910 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-10-24 21:30:34 +00:00
parent 6c6fdec733
commit da6bc22d35
3 changed files with 12 additions and 0 deletions

View file

@ -28,6 +28,8 @@ struct glfiltermodes {
#define NUMGLFILTERMODES 6
extern struct glfiltermodes glfiltermodes[NUMGLFILTERMODES];
extern void Polymost_prepare_loadboard(void);
//void phex(char v, char *s);
void uploadtexture(int32_t doalloc, vec2_t siz, int32_t texfmt, coltype *pic, vec2_t tsiz, int32_t dameth);
void polymost_drawsprite(int32_t snum);

View file

@ -8937,6 +8937,11 @@ static void prepare_loadboard(int32_t fil, vec3_t *dapos, int16_t *daang, int16_
Bmemset(spritechanged, 0, sizeof(spritechanged));
Bmemset(wallchanged, 0, sizeof(wallchanged));
#ifdef USE_OPENGL
if (getrendermode() == REND_POLYMOST)
Polymost_prepare_loadboard();
#endif
if (!have_maptext())
{
kread(fil,&dapos->x,4); dapos->x = B_LITTLE32(dapos->x);

View file

@ -4278,6 +4278,11 @@ typedef struct
wallspriteinfo_t wsprinfo[MAXSPRITES];
void Polymost_prepare_loadboard(void)
{
Bmemset(wsprinfo, 0, sizeof(wsprinfo));
}
static inline int32_t polymost_findwall(uspritetype const * const tspr, vec2_t const * const tsiz, int32_t * rd)
{
int32_t dist = 4, closest = -1;