From a26bcf74238a9564e950b878337fbe60648cb2e8 Mon Sep 17 00:00:00 2001 From: driAn Date: Mon, 1 Oct 2007 18:51:23 +0000 Subject: [PATCH] no message git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1326 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 1 + source/src/server.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 72ab0dca..69434059 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -735,6 +735,7 @@ void voteresult(int v) { curvote->result = v; curvote->millis = lastmillis + 5000; + conoutf("vote %s", v == VOTE_YES ? "passed" : "failed"); playsound(v == VOTE_YES ? S_VOTEPASS : S_VOTEFAIL); } } diff --git a/source/src/server.cpp b/source/src/server.cpp index 3e0446e0..f2edd0b5 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -210,7 +210,6 @@ struct client // server side version of "dynent" type events.setsizenodelete(0); timesync = false; lastevent = 0; - lastvotecall = 0; } void reset() @@ -220,6 +219,7 @@ struct client // server side version of "dynent" type messages.setsizenodelete(0); isauthed = false; role = CR_DEFAULT; + lastvotecall = 0; mapchange(); } }; @@ -1219,7 +1219,7 @@ void checkvotes(bool forceend) sendf(-1, 1, "ri2", SV_VOTERESULT, VOTE_YES); curvote->pass(); } - else if(forceend || stats[VOTE_NO]/(float)total > requiredcount) + else if(forceend || stats[VOTE_NO]/(float)total > requiredcount || stats[VOTE_NO] >= stats[VOTE_YES]+stats[VOTE_NEUTRAL]) { sendf(-1, 1, "ri2", SV_VOTERESULT, VOTE_NO); }