From 06d12f6085ebfdb7c72fd97b756362239c80814d Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Tue, 26 Apr 2011 09:48:40 +0000 Subject: [PATCH] Replace a few numeric constants with already defined macros, patch by ZTurtleMan --- code/game/ai_main.h | 2 +- code/renderer/tr_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/ai_main.h b/code/game/ai_main.h index 120c772a..1b19ff76 100644 --- a/code/game/ai_main.h +++ b/code/game/ai_main.h @@ -128,7 +128,7 @@ typedef struct bot_state_s playerState_t cur_ps; //current player state int last_eFlags; //last ps flags usercmd_t lastucmd; //usercmd from last frame - int entityeventTime[1024]; //last entity event time + int entityeventTime[MAX_GENTITIES]; //last entity event time // bot_settings_t settings; //several bot settings int (*ainode)(struct bot_state_s *bs); //current AI node diff --git a/code/renderer/tr_main.c b/code/renderer/tr_main.c index e7c05424..2f8fd2ad 100644 --- a/code/renderer/tr_main.c +++ b/code/renderer/tr_main.c @@ -1128,7 +1128,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 ) & 1023; + *entityNum = ( sort >> QSORT_ENTITYNUM_SHIFT ) & (MAX_GENTITIES-1); *dlightMap = sort & 3; }