mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-22 09:31:11 +00:00
IOQ3 commit 2196
This commit is contained in:
parent
54448fe498
commit
4581c7e8ec
4 changed files with 6 additions and 4 deletions
|
@ -1591,7 +1591,7 @@ qboolean ValidBloodPool(vec3_t start)
|
||||||
|
|
||||||
CG_Trace(&trace, this_pos, NULL, NULL, end_pos, -1, CONTENTS_SOLID);
|
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;
|
return qfalse;
|
||||||
|
|
||||||
if (!(!trace.startsolid && trace.fraction < 1))
|
if (!(!trace.startsolid && trace.fraction < 1))
|
||||||
|
|
|
@ -836,7 +836,7 @@ the bits are allocated as follows:
|
||||||
*/
|
*/
|
||||||
#define QSORT_FOGNUM_SHIFT 2
|
#define QSORT_FOGNUM_SHIFT 2
|
||||||
#define QSORT_ENTITYNUM_SHIFT 7
|
#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
|
#if (QSORT_SHADERNUM_SHIFT+SHADERNUM_BITS) > 32
|
||||||
#error "Need to update sorting, too many bits."
|
#error "Need to update sorting, too many bits."
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1127,7 +1127,7 @@ void R_DecomposeSort( unsigned sort, int *entityNum, shader_t **shader,
|
||||||
int *fogNum, int *dlightMap ) {
|
int *fogNum, int *dlightMap ) {
|
||||||
*fogNum = ( sort >> QSORT_FOGNUM_SHIFT ) & 31;
|
*fogNum = ( sort >> QSORT_FOGNUM_SHIFT ) & 31;
|
||||||
*shader = tr.sortedShaders[ ( sort >> QSORT_SHADERNUM_SHIFT ) & (MAX_SHADERS-1) ];
|
*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;
|
*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_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
|
// renderfx flags
|
||||||
#define RF_MINLIGHT 0x0001 // allways have some light (viewmodel, some items)
|
#define RF_MINLIGHT 0x0001 // allways have some light (viewmodel, some items)
|
||||||
|
|
Loading…
Reference in a new issue