Back to TPG

TPG.Voting.RockTheVote

S🏷️ Voting

Part of TPG namespace

TPG.Voting.RockTheVote(ply)
View on GitHub|gamemode/voting/sv_voting.lua:51-83
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Register ply's RTV vote and start the map vote once enough players agree. Any connected player counts toward both the numerator and totalPlayers, spectators included -- there is no team check here, unlike most other TPG systems. The threshold is max(ceil(totalPlayers * TPG.Config.rtvPercentRequired), TPG.Config.rtvMinPlayers), recomputed from scratch on every vote. Voting again after already voting is harmless (it just re-sets the same flag to true); there is no way to un-vote.

Parameters

NameTypeDescription
plyPlayerThe voter.

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.