Polymer: apply ART animation to spotlight lightmaps.

git-svn-id: https://svn.eduke32.com/eduke32@2054 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2011-10-02 01:44:54 +00:00
parent 98b6be4fed
commit 7c4b84a8f2

View file

@ -5217,7 +5217,6 @@ static void polymer_invalidatesectorlights(int16_t sectnum)
static void polymer_processspotlight(_prlight* light) static void polymer_processspotlight(_prlight* light)
{ {
float radius, ang, horizang, lightpos[3]; float radius, ang, horizang, lightpos[3];
pthtyp* pth;
// hack to avoid lights beams perpendicular to walls // hack to avoid lights beams perpendicular to walls
if ((light->horiz <= 100) && (light->horiz > 90)) if ((light->horiz <= 100) && (light->horiz > 90))
@ -5259,11 +5258,17 @@ static void polymer_processspotlight(_prlight* light)
light->lightmap = 0; light->lightmap = 0;
if (light->tilenum > 0) if (light->tilenum > 0)
{ {
if (!waloff[light->tilenum]) int16_t picnum = light->tilenum;
loadtile(light->tilenum); pthtyp* pth;
if (picanm[picnum] & 192)
picnum += animateoffs(picnum, 0);
if (!waloff[picnum])
loadtile(picnum);
pth = NULL; pth = NULL;
pth = gltexcache(light->tilenum, 0, 0); pth = gltexcache(picnum, 0, 0);
if (pth) if (pth)
light->lightmap = pth->glpic; light->lightmap = pth->glpic;