diff options
| author | scosu <scosu@gmx.de> | 2008-11-08 09:02:35 +0000 |
|---|---|---|
| committer | scosu <scosu@gmx.de> | 2008-11-08 09:02:35 +0000 |
| commit | cd1c92c41b38350d832b163be27274efdde597d6 (patch) | |
| tree | c072dcc1f1edae9f851a14806f35282c2e74b8c1 /src/game/server/gamemodes/ctf.cpp | |
| parent | d3d2fb2c0b09d04915a428fed481c448487f2f98 (diff) | |
| download | zcatch-cd1c92c41b38350d832b163be27274efdde597d6.tar.gz zcatch-cd1c92c41b38350d832b163be27274efdde597d6.zip | |
a nicer solution for changeset:1669
Diffstat (limited to 'src/game/server/gamemodes/ctf.cpp')
| -rw-r--r-- | src/game/server/gamemodes/ctf.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/server/gamemodes/ctf.cpp b/src/game/server/gamemodes/ctf.cpp index 05265bb7..10249e11 100644 --- a/src/game/server/gamemodes/ctf.cpp +++ b/src/game/server/gamemodes/ctf.cpp @@ -115,11 +115,10 @@ 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) + if(!close_characters[i]->alive || close_characters[i]->player->team == -1 || col_intersect_line(f->pos, close_characters[i]->pos, NULL)) continue; - int collision = col_intersect_line(f->pos, close_characters[i]->pos, NULL); - if(!collision && close_characters[i]->team == f->team) + if(close_characters[i]->team == f->team) { // return the flag if(!f->at_stand) @@ -135,7 +134,7 @@ void GAMECONTROLLER_CTF::tick() f->reset(); } } - else if(!collision) + else { // take the flag if(f->at_stand) |