mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-01-18 21:51:37 +00:00
Fixed usage of various entity defines.
This commit is contained in:
parent
4e59ef714b
commit
0724458818
4 changed files with 6 additions and 4 deletions
|
@ -1703,7 +1703,7 @@ qboolean ValidBloodPool (vec3_t start)
|
|||
CG_Trace (&trace, this_pos, NULL, NULL, end_pos, -1, CONTENTS_SOLID);
|
||||
|
||||
|
||||
if (trace.entityNum < (MAX_ENTITIES - 1)) // may only land on world
|
||||
if (trace.entityNum < ENTITYNUM_WORLD) // may only land on world
|
||||
return qfalse;
|
||||
|
||||
if (!(!trace.startsolid && trace.fraction < 1))
|
||||
|
|
|
@ -836,7 +836,7 @@ the bits are allocated as follows:
|
|||
*/
|
||||
#define QSORT_FOGNUM_SHIFT 2
|
||||
#define QSORT_ENTITYNUM_SHIFT 7
|
||||
#define QSORT_SHADERNUM_SHIFT (QSORT_ENTITYNUM_SHIFT+GENTITYNUM_BITS)
|
||||
#define QSORT_SHADERNUM_SHIFT (QSORT_ENTITYNUM_SHIFT+ENTITYNUM_BITS)
|
||||
#if (QSORT_SHADERNUM_SHIFT+SHADERNUM_BITS) > 32
|
||||
#error "Need to update sorting, too many bits."
|
||||
#endif
|
||||
|
|
|
@ -1127,7 +1127,7 @@ void R_DecomposeSort( unsigned sort, int *entityNum, shader_t **shader,
|
|||
int *fogNum, int *dlightMap ) {
|
||||
*fogNum = ( sort >> QSORT_FOGNUM_SHIFT ) & 31;
|
||||
*shader = tr.sortedShaders[ ( sort >> QSORT_SHADERNUM_SHIFT ) & (MAX_SHADERS-1) ];
|
||||
*entityNum = ( sort >> QSORT_ENTITYNUM_SHIFT ) & (MAX_GENTITIES-1);
|
||||
*entityNum = ( sort >> QSORT_ENTITYNUM_SHIFT ) & MAX_ENTITIES;
|
||||
*dlightMap = sort & 3;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
|
||||
#define MAX_DLIGHTS 32 // can't be increased, because bit flags are used on surfaces
|
||||
#define MAX_ENTITIES 1023 // can't be increased without changing drawsurf bit packing
|
||||
|
||||
#define ENTITYNUM_BITS 10 // can't be increased without changing drawsurf bit packing
|
||||
#define MAX_ENTITIES ((1<<ENTITYNUM_BITS) - 1)
|
||||
|
||||
// renderfx flags
|
||||
#define RF_MINLIGHT 0x0001 // allways have some light (viewmodel, some items)
|
||||
|
|
Loading…
Reference in a new issue