summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Millwood <thebenmachine@gmail.com>2009-11-24 20:27:08 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:17:22 +0000
commit4b7b3e3d307e976912230deda40595a3c9af2cff (patch)
tree4bba508282b3a29ebe640f62751e8492dfa2ffee /src
parent7aa5ec7e92a51ecaffb480d73019f4a8a9db452b (diff)
* Don't return an in-use trail system when no empty slot could be found
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_trails.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/cgame/cg_trails.c b/src/cgame/cg_trails.c
index 74a18e7f..05f5ef5e 100644
--- a/src/cgame/cg_trails.c
+++ b/src/cgame/cg_trails.c
@@ -1262,11 +1262,14 @@ static trailBeam_t *CG_SpawnNewTrailBeam( baseTrailBeam_t *btb,
if( cg_debugTrails.integer >= 1 )
CG_Printf( "TB %s created\n", ts->class->name );
- break;
+ return tb;
}
}
- return tb;
+ if( cg_debugTrails.integer >= 1 )
+ CG_Printf( "MAX_TRAIL_BEAMS\n" );
+
+ return NULL;
}
@@ -1310,11 +1313,14 @@ trailSystem_t *CG_SpawnNewTrailSystem( qhandle_t psHandle )
if( cg_debugTrails.integer >= 1 )
CG_Printf( "TS %s created\n", bts->name );
- break;
+ return ts;
}
}
- return ts;
+ if( cg_debugTrails.integer >= 1 )
+ CG_Printf( "MAX_TRAIL_SYSTEMS\n" );
+
+ return NULL;
}
/*