do not take/reset the flag if character is dead or spectator; ticket #556

This commit is contained in:
Dominik Geyer 2008-11-04 16:35:48 +00:00
parent 0259e5c3e5
commit 1adbddccca

View file

@ -115,6 +115,9 @@ void GAMECONTROLLER_CTF::tick()
int num = game.world.find_entities(f->pos, 32.0f, (ENTITY**)close_characters, MAX_CLIENTS, NETOBJTYPE_CHARACTER);
for(int i = 0; i < num; i++)
{
if(!close_characters[i]->alive || close_characters[i]->player->team == -1)
continue;
int collision = col_intersect_line(f->pos, close_characters[i]->pos, NULL);
if(!collision && close_characters[i]->team == f->team)
{