no message
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1326 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user