ensure that ent->classname is always non-null (for entity numbers up to level.num_entities-1, and ENTITYNUM_WORLD and ENTITYNUM_NONE), for player entities and #ENTITYNUM_NONE in particular, patch by DevHC

This commit is contained in:
Thilo Schulz 2011-05-14 14:34:18 +00:00
parent 4b9ab42c2c
commit 30059eb8ce
4 changed files with 341 additions and 79 deletions

View file

@ -582,8 +582,13 @@ void SP_worldspawn( void ) {
trap_Cvar_Set( "g_enableBreath", s );
g_entities[ENTITYNUM_WORLD].s.number = ENTITYNUM_WORLD;
g_entities[ENTITYNUM_WORLD].r.ownerNum = ENTITYNUM_NONE;
g_entities[ENTITYNUM_WORLD].classname = "worldspawn";
g_entities[ENTITYNUM_NONE].s.number = ENTITYNUM_NONE;
g_entities[ENTITYNUM_NONE].r.ownerNum = ENTITYNUM_NONE;
g_entities[ENTITYNUM_NONE].classname = "nothing";
// see if we want a warmup time
trap_SetConfigstring( CS_WARMUP, "" );
if ( g_restarted.integer ) {