diff options
| author | Dominik Geyer <dominik.geyer@gmx.de> | 2008-10-18 20:37:41 +0000 |
|---|---|---|
| committer | Dominik Geyer <dominik.geyer@gmx.de> | 2008-10-18 20:37:41 +0000 |
| commit | 3cdb90c10c29facca3b28f57c1c815bdcc5dc5b1 (patch) | |
| tree | 3c4c9650a78a8ac1b4b93757e0d1337b03d5f1db /src | |
| parent | 9d1c56e2fd31ad5e5a02506e715831bba66b23c9 (diff) | |
| download | zcatch-3cdb90c10c29facca3b28f57c1c815bdcc5dc5b1.tar.gz zcatch-3cdb90c10c29facca3b28f57c1c815bdcc5dc5b1.zip | |
reset flag when it hits a death-tile; ticket #513
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/server/entities/character.cpp | 1 | ||||
| -rw-r--r-- | src/game/server/gamemodes/ctf.cpp | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 18db9e3b..88fa3ffa 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -601,6 +601,7 @@ void CHARACTER::tick() core.input = input; core.tick(true); + // handle death-tiles if(col_get((int)pos.x, (int)pos.y)&COLFLAG_DEATH) die(player->client_id, -1); diff --git a/src/game/server/gamemodes/ctf.cpp b/src/game/server/gamemodes/ctf.cpp index 6e5d1e45..0ef82df8 100644 --- a/src/game/server/gamemodes/ctf.cpp +++ b/src/game/server/gamemodes/ctf.cpp @@ -73,6 +73,13 @@ void GAMECONTROLLER_CTF::tick() if(!f) continue; + // flag hits death-tile, reset it + if(col_get((int)f->pos.x, (int)f->pos.y)&COLFLAG_DEATH) + { + f->reset(); + continue; + } + // if(f->carrying_character) { |