mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 09:21:12 +00:00
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:
parent
a6d349c90a
commit
98b6be4fed
1 changed files with 13 additions and 3 deletions
|
@ -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;
|
||||
|
@ -1491,7 +1501,7 @@ void polymer_texinvalidate(void)
|
|||
prsectors[i--]->flags.invalidtex = 1;
|
||||
while (i >= 0);
|
||||
|
||||
i = numwalls-1;
|
||||
i = numwalls - 1;
|
||||
do
|
||||
prwalls[i--]->flags.invalidtex = 1;
|
||||
while (i >= 0);
|
||||
|
|
Loading…
Reference in a new issue