Commit 43f75dd5 authored by Mikleo's avatar Mikleo
Browse files

--

parent baca9292
Pipeline #8592 passed with stages
in 21 seconds
......@@ -8,7 +8,7 @@
#include <empstats>
#include <updater>
#define PluginVersion "1.05"
#define PluginVersion "1.06"
#define UPDATE_URL "https://sourcemod.docs.empiresmod.com/DraftPick/dist/updater.txt"
......@@ -256,7 +256,7 @@ public void OnPluginStart()
dp_maxpick = CreateConVar("dp_maxpick", "40", "maximum number of picks before autopick");
dp_overlay = CreateConVar("dp_overlay", "draftpick/draft_background", "The overlay for draft mode.");
dp_autodraft_comms = CreateConVar("dp_autodraft_comms", "1", "Decide comms in autodraft.");
dp_captainvote_playerratio = CreateConVar("dp_captainvote_playerratio", "0.22", "Percent of players needed to vote for each captain");
dp_captainvote_playerratio = CreateConVar("dp_captainvote_playerratio", "0.25", "Percent of players needed to vote for each captain");
dp_autodraft_display_pick = CreateConVar("dp_autodraft_display_pick", "0", "Should autodraft pick be displayed in chat");
......@@ -3093,6 +3093,8 @@ Stage_Game_Start()
}
public Action Timer_AfterGameStart(Handle timer)
{
// toggle so captain only gets half of the votes, can be overcome more easily.
bool voteToggle[2];
for (int i=1; i<=MaxClients; i++)
{
if(IsClientInGame(i))
......@@ -3102,8 +3104,23 @@ public Action Timer_AfterGameStart(Handle timer)
if(t>= 0 && captains[t] > 0)
{
// vote for captain here.
FakeClientCommand(i,"emp_commander_vote %d",captains[t]);
if(i == captains[t])
{
//do not toggle, this vote is assumed to vote for themselves.
FakeClientCommand(i,"emp_commander_vote %d",i);
}
else if(!voteToggle[t])
{
voteToggle[t] = true;
// vote for captain here.
FakeClientCommand(i,"emp_commander_vote %d",captains[t]);
}
else
{
voteToggle[t] = false;
}
}
......
......@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "1.05"
"Latest" "1.06"
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment