diff --git a/polymer/eduke32/build/include/polymost.h b/polymer/eduke32/build/include/polymost.h index 88cac7960..67f46c3b0 100644 --- a/polymer/eduke32/build/include/polymost.h +++ b/polymer/eduke32/build/include/polymost.h @@ -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); diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index cde65d8a5..039d00f97 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -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); diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 9f7f09cb2..0501d7dc7 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -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;