diff options
author | M. Kristall <mkpdev@gmail.com> | 2010-01-17 05:21:37 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:25 +0000 |
commit | 8d2328070e6c53e91ff145ddcbfe5c27a38965c7 (patch) | |
tree | 0899cdf1269dff9a3657eb0e2ba1ce407aad99a8 | |
parent | 1573be6af74dc4b0106c4301813f9da2911187fe (diff) |
* 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
-rw-r--r-- | src/game/bg_public.h | 3 | ||||
-rw-r--r-- | 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 ) |