Fixes entities not being rendered after number 1023

This fixes #310 where some static models would not be rendered, making it look like there are invisible walls.
This commit is contained in:
smallmodel 2024-06-21 21:48:55 +02:00
parent a7df73073d
commit 64626a767c
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
2 changed files with 3 additions and 3 deletions

View file

@ -1384,7 +1384,7 @@ R_DecomposeSort
*/
void R_DecomposeSort(unsigned int sort, int* entityNum, shader_t** shader, int* dlightMap, qboolean* bStaticModel) {
*shader = tr.sortedShaders[ ( sort >> QSORT_SHADERNUM_SHIFT ) & (MAX_SHADERS-1) ];
*entityNum = ( sort >> QSORT_ENTITYNUM_SHIFT ) & 1023;
*entityNum = ( sort >> QSORT_ENTITYNUM_SHIFT ) & 4095;
*dlightMap = sort & 15;
*bStaticModel = sort & (1 << QSORT_STATICMODEL_SHIFT);
}