gameServer2/src/server/actions.rs
changeset 14350 31717e1436cd
parent 13801 5fb40c8e5542
child 14374 e5db279308d7
--- a/gameServer2/src/server/actions.rs	Fri Nov 30 17:09:08 2018 +0100
+++ b/gameServer2/src/server/actions.rs	Fri Nov 30 22:37:29 2018 +0300
@@ -339,7 +339,7 @@
             if let Some(r) = server.room(client_id) {
                 let mut result = None;
                 if let Some(ref mut voting) = r.voting {
-                    if is_forced || voting.votes.iter().find(|(id, _)| client_id == *id).is_none() {
+                    if is_forced || voting.votes.iter().all(|(id, _)| client_id != *id) {
                         actions.push(server_chat("Your vote has been counted.".to_string())
                             .send_self().action());
                         voting.votes.push((client_id, vote));