From 1adbddcccac078f54a8e57bab99109297c74fd6a Mon Sep 17 00:00:00 2001 From: Dominik Geyer Date: Tue, 4 Nov 2008 16:35:48 +0000 Subject: do not take/reset the flag if character is dead or spectator; ticket #556 --- src/game/server/gamemodes/ctf.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game/server/gamemodes/ctf.cpp b/src/game/server/gamemodes/ctf.cpp index 498a41c9..05265bb7 100644 --- a/src/game/server/gamemodes/ctf.cpp +++ b/src/game/server/gamemodes/ctf.cpp @@ -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) { -- cgit 1.4.1