Make sure to check if the sprite is valid

This commit is contained in:
smallmodel 2024-12-22 19:57:14 +01:00
parent 439e0718ce
commit 1d0b912f75
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -3126,6 +3126,10 @@ void R_AddSpriteSurfaces()
tr.currentModel = tr.models[0];
}
if (tr.currentModel->type != MOD_SPRITE) {
continue;
}
R_AdjustVisBoundsForSprite(&tr.refdef.sprites[tr.currentSpriteNum], &tr.viewParms, &tr.or );
sprite->shaderNum = tr.currentModel->d.sprite->shader->sortedIndex;