multiple world beam entities

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1168 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2005-07-28 04:11:38 +00:00
parent aa85907fa0
commit f75b31bd6d
1 changed files with 8 additions and 5 deletions

View File

@ -306,11 +306,14 @@ beam_t *CL_NewBeam (int entity, int tag)
beam_t *b;
int i;
// override any beam with the same entity
for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++)
if (b->entity == entity && b->tag == tag)
{
return b;
}
if (entity) // allow multiple world beams
{
for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++)
if (b->entity == entity && b->tag == tag)
{
return b;
}
}
// find a free beam
for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++)