diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-09-25 14:04:02 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-09-25 14:04:02 +0000 |
| commit | 6d44adb7114a0be6ecb1b0fabc6fe69d308cad1c (patch) | |
| tree | cc8a72be53f461ca06dda2f15cc0b56679a9e417 /src/game/server/gamecontext.cpp | |
| parent | f96be4eb0ed4430013c8ecfcb043c049d5103479 (diff) | |
| download | zcatch-6d44adb7114a0be6ecb1b0fabc6fe69d308cad1c.tar.gz zcatch-6d44adb7114a0be6ecb1b0fabc6fe69d308cad1c.zip | |
fixed keybindings. reworked the voting a bit. added vote spamming protection. added ingame voting hud.
Diffstat (limited to 'src/game/server/gamecontext.cpp')
| -rw-r--r-- | src/game/server/gamecontext.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index d5e5c19d..258b2994 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -321,8 +321,11 @@ void GAMECONTEXT::tick() console_execute_line(vote_command); end_vote(); send_chat(-1, GAMECONTEXT::CHAT_ALL, "Vote passed"); + + if(players[vote_creator]) + players[vote_creator]->last_votecall = 0; } - else if(time_get() > vote_closetime || no >= total/2+1) + else if(time_get() > vote_closetime || no >= total/2+1 || yes+no == total) { end_vote(); send_chat(-1, GAMECONTEXT::CHAT_ALL, "Vote failed"); |