mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +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,16 +1482,26 @@ 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;
|
||||
|
||||
|
||||
do
|
||||
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