In md3postload_polymer, always clear the triangle buffer (tribuf) to zero, not just when its allocation size is enlarged.

Fixes strange issues with lighting on models.

git-svn-id: https://svn.eduke32.com/eduke32@6396 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-07-28 11:29:16 +00:00
parent d1de78d8bc
commit e2c1e6b12c

View file

@ -1863,10 +1863,11 @@ int md3postload_polymer(md3model_t *m)
if (s->numverts > tribufverts) if (s->numverts > tribufverts)
{ {
tribuf = (int32_t *) Xrealloc(tribuf, s->numverts * sizeof(int32_t)); tribuf = (int32_t *) Xrealloc(tribuf, s->numverts * sizeof(int32_t));
Bmemset(tribuf, 0, s->numverts * sizeof(int32_t));
tribufverts = s->numverts; tribufverts = s->numverts;
} }
Bmemset(tribuf, 0, s->numverts * sizeof(int32_t));
verti = 0; verti = 0;
while (verti < (m->head.numframes * s->numverts)) while (verti < (m->head.numframes * s->numverts))
{ {