Polymer: Discard cached sprite planes on texinvalidate

Sprites would stick with their old material on global palette change.
This goes through all prsprites and clobbers their CRCs so that an
alternate skin / tint / highpal can be applied accordingly.

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

View file

@ -1482,7 +1482,17 @@ void polymer_invalidatelights(void)
void polymer_texinvalidate(void)
{
int32_t i = numsectors-1;
int32_t i;
i = 0;
while (i < MAXSPRITES) {
if (prsprites[i])
prsprites[i]->crc = 0xDEADBEEF;
i++;
}
i = numsectors - 1;
if (!numsectors || !prsectors[i])
return;