diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-11-27 19:32:35 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-11-27 19:32:35 +0000 |
| commit | 8fa8485a3a207565a610dac981cb2da2a6a6d040 (patch) | |
| tree | 5ee8d57e86c4e7d5b17fc8772f79e719d1789c92 /src/game/server/srv_ctf.cpp | |
| parent | 9a8c0809c78782a1bcd038fe29277c12dbe781b8 (diff) | |
| download | zcatch-8fa8485a3a207565a610dac981cb2da2a6a6d040.tar.gz zcatch-8fa8485a3a207565a610dac981cb2da2a6a6d040.zip | |
fixed CTF sounds. fixed close teewars bug
Diffstat (limited to 'src/game/server/srv_ctf.cpp')
| -rw-r--r-- | src/game/server/srv_ctf.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/game/server/srv_ctf.cpp b/src/game/server/srv_ctf.cpp index e941c804..81f1bb84 100644 --- a/src/game/server/srv_ctf.cpp +++ b/src/game/server/srv_ctf.cpp @@ -43,6 +43,7 @@ int gameobject_ctf::on_player_death(class player *victim, class player *killer, had_flag |= 2; if(f && f->carrying_player == victim) { + create_sound_global(SOUND_CTF_DROP); f->drop_tick = server_tick(); f->carrying_player = 0; had_flag |= 1; @@ -77,6 +78,9 @@ void gameobject_ctf::tick() teamscore[fi^1]++; for(int i = 0; i < 2; i++) flags[i]->reset(); + + dbg_msg("", "capture sound %d", SOUND_CTF_CAPTURE); + create_sound_global(SOUND_CTF_CAPTURE); } } } @@ -91,21 +95,28 @@ void gameobject_ctf::tick() { // return the flag if(!f->at_stand) + { + create_sound_global(SOUND_CTF_RETURN); f->reset(); + } } else { // take the flag f->at_stand = 0; f->carrying_player = players[i]; + create_sound_global(SOUND_CTF_GRAB); break; } } - if(!f->carrying_player) + if(!f->carrying_player && !f->at_stand) { if(server_tick() > f->drop_tick + SERVER_TICK_SPEED*30) + { + create_sound_global(SOUND_CTF_RETURN); f->reset(); + } else { f->vel.y += gravity; |