Skip to content

Commit a50a921

Browse files
authored
Merge pull request #96 from JoelKovalcson/patch-1
Fix for integer division.
2 parents 6026738 + 23217b5 commit a50a921

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Essentials/Commands/VotingModule.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ private IEnumerable VoteCountdown(TimeSpan time)
238238
}
239239
else
240240
{
241-
double vr = _voteReg.Count / MySession.Static.Players.GetOnlinePlayerCount();
241+
double vr = (double)_voteReg.Count / MySession.Static.Players.GetOnlinePlayerCount();
242242
if (vr >= _command.TriggerRatio)
243243
{
244244
Context.Torch.CurrentSession.Managers.GetManager<IChatManagerClient>()
@@ -275,4 +275,4 @@ private string Pluralize(double num)
275275
return num == 1 ? "" : "s";
276276
}
277277
}
278-
}
278+
}

0 commit comments

Comments
 (0)