diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index e93de5dccc..104646170d 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -424,7 +424,7 @@
switch(ignore_category ? askuser(M,Question,"Please answer in [poll_time/10] seconds!","Yes","No","Never for this round", StealFocus=0, Timeout=poll_time) : askuser(M,Question,"Please answer in [poll_time/10] seconds!","Yes","No", StealFocus=0, Timeout=poll_time))
if(1)
to_chat(M, "Choice registered: Yes.")
- if((world.time-time_passed)>poll_time)
+ if(time_passed + poll_time <= world.time)
to_chat(M, "Sorry, you answered too late to be considered!")
M << 'sound/machines/buzz-sigh.ogg'
candidates -= M
@@ -449,15 +449,14 @@
for(var/mob/dead/observer/G in GLOB.player_list)
candidates += G
- pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category, flashwindow, candidates)
-
- return candidates
+ return pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category, flashwindow, candidates)
/proc/pollCandidates(Question, jobbanType, datum/game_mode/gametypeCheck, be_special_flag = 0, poll_time = 300, ignore_category = null, flashwindow = TRUE, list/group = null)
var/time_passed = world.time
if (!Question)
Question = "Would you like to be a special role?"
+ var/list/result = list()
for(var/m in group)
var/mob/M = m
if(!M.key || !M.client || (ignore_category && GLOB.poll_ignore[ignore_category] && M.ckey in GLOB.poll_ignore[ignore_category]))
@@ -472,17 +471,17 @@
if(jobban_isbanned(M, jobbanType) || jobban_isbanned(M, "Syndicate"))
continue
- showCandidatePollWindow(M, poll_time, Question, group, ignore_category, time_passed, flashwindow)
+ showCandidatePollWindow(M, poll_time, Question, result, ignore_category, time_passed, flashwindow)
sleep(poll_time)
//Check all our candidates, to make sure they didn't log off or get deleted during the wait period.
- for(var/mob/M in group)
+ for(var/mob/M in result)
if(!M.key || !M.client)
- group -= M
+ result -= M
- listclearnulls(group)
+ listclearnulls(result)
- return group
+ return result
/proc/pollCandidatesForMob(Question, jobbanType, datum/game_mode/gametypeCheck, be_special_flag = 0, poll_time = 300, mob/M, ignore_category = null)
var/list/L = pollGhostCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category)