From d9128d874b72d05c08fbbd6e6d71013c252a4ca9 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sun, 12 Jul 2026 10:49:59 -0400 Subject: [PATCH] Switch from FloatCompare to < operator in vote plugins --- plugins/basevotes.sp | 2 +- plugins/funvotes.sp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/basevotes.sp b/plugins/basevotes.sp index bd2f4b67..93252b93 100644 --- a/plugins/basevotes.sp +++ b/plugins/basevotes.sp @@ -294,7 +294,7 @@ public int Handler_VoteCallback(Menu menu, MenuAction action, int param1, int pa } // A multi-argument vote is "always successful", but have to check if its a Yes/No vote. - if ((strcmp(item, VOTE_YES) == 0 && FloatCompare(percent,limit) < 0 && param1 == 0) || (strcmp(item, VOTE_NO) == 0 && param1 == 1)) + if ((strcmp(item, VOTE_YES) == 0 && percent < limit && param1 == 0) || (strcmp(item, VOTE_NO) == 0 && param1 == 1)) { /* :TODO: g_voteTarget should be used here and set to -1 if not applicable. */ diff --git a/plugins/funvotes.sp b/plugins/funvotes.sp index 6edbe42a..a8ed0695 100644 --- a/plugins/funvotes.sp +++ b/plugins/funvotes.sp @@ -220,7 +220,7 @@ public int Handler_VoteCallback(Menu menu, MenuAction action, int param1, int pa limit = g_Cvar_Limits[g_voteType].FloatValue; // A multi-argument vote is "always successful", but have to check if its a Yes/No vote. - if ((strcmp(item, VOTE_YES) == 0 && FloatCompare(percent,limit) < 0 && param1 == 0) || (strcmp(item, VOTE_NO) == 0 && param1 == 1)) + if ((strcmp(item, VOTE_YES) == 0 && percent < limit && param1 == 0) || (strcmp(item, VOTE_NO) == 0 && param1 == 1)) { /* :TODO: g_voteTarget should be used here and set to -1 if not applicable. */