From 8d2328070e6c53e91ff145ddcbfe5c27a38965c7 Mon Sep 17 00:00:00 2001 From: "M. Kristall" Date: Sun, 17 Jan 2010 05:21:37 +0000 Subject: * Complain about too many target_locations * Do not send "unknown" location since it is ignored and may not always be sent * Remove unused CS_PRECACHES --- src/game/bg_public.h | 3 +-- src/game/g_target.c | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 912e2d39..c9c752e0 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -72,8 +72,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define CS_SHADERS (CS_SOUNDS+MAX_SOUNDS) #define CS_PARTICLE_SYSTEMS (CS_SHADERS+MAX_GAME_SHADERS) #define CS_PLAYERS (CS_PARTICLE_SYSTEMS+MAX_GAME_PARTICLE_SYSTEMS) -#define CS_PRECACHES (CS_PLAYERS+MAX_CLIENTS) -#define CS_LOCATIONS (CS_PRECACHES+MAX_CLIENTS) +#define CS_LOCATIONS (CS_PLAYERS+MAX_CLIENTS) #define CS_MAX (CS_LOCATIONS+MAX_LOCATIONS) diff --git a/src/game/g_target.c b/src/game/g_target.c index 5d84e223..5346d5b6 100644 --- a/src/game/g_target.c +++ b/src/game/g_target.c @@ -303,8 +303,11 @@ void SP_target_location( gentity_t *self ) self->s.eType = ET_LOCATION; self->r.svFlags = SVF_BROADCAST; trap_LinkEntity( self ); // make the server send them to the clients - if( !level.locationHead ) - trap_SetConfigstring( CS_LOCATIONS, "unknown" ); + if( n == MAX_LOCATIONS ) + { + G_Printf( S_COLOR_YELLOW "too many target_locations\n" ); + return; + } if( self->count ) { if( self->count < 0 ) -- cgit