Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
sourcemod
DraftPick
Commits
58053102
Commit
58053102
authored
Oct 19, 2019
by
Mikleo
Browse files
--
parent
d35c93de
Pipeline
#7375
passed with stages
in 20 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dist/addons/sourcemod/plugins/draftpick.smx
View file @
58053102
No preview for this file type
dist/addons/sourcemod/scripting/draftpick.sp
View file @
58053102
...
...
@@ -8,7 +8,7 @@
#include <empstats>
#include <updater>
#define PluginVersion "0.9
7
"
#define PluginVersion "0.9
8
"
#define UPDATE_URL "https://sourcemod.docs.empiresmod.com/DraftPick/dist/updater.txt"
...
...
@@ -784,7 +784,7 @@ void StartBatchJoin(int client,int time)
{
joiningPlayers.Push(client);
AntiGhostClient(client);
if(batchJoinTime
=
= 0)
if(batchJoinTime
<
= 0)
{
batchJoinTime = time;
Handle timer = CreateTimer(1.0, Timer_BatchJoin,_,TIMER_REPEAT);
...
...
@@ -1988,8 +1988,9 @@ public Action correctSpec(Handle timer)
// we don't know if it is comm map initially
public Action StartDraft(Handle timer)
{
// continuous modes only work on comm maps at the moment.
if(EU_IsClassicMap())
// continuous modes only work on comm maps at the moment.
// make sure when reloading draft plugin we dont start the draft.
if(!EU_HasGameStarted() && EU_IsClassicMap())
{
if(continuousMode > 0)
{
...
...
@@ -2981,17 +2982,24 @@ Stage_Game_End(int nextStage)
for(int i = 0;i<joiningPlayers.Length;i++)
{
int client = joiningPlayers.Get(i);
if(nextStage != STAGE_DISABLED)
{
// move the joining player directly to nf for redrafting.
ForceTeam(client,2);
}
else
// there was an major error where the player wasn't in game at this point
if(IsClientInGame(client))
{
// just autoassign the player if draft has been disabled.
FakeClientCommandEx(client, "jointeam 4");
if(nextStage != STAGE_DISABLED)
{
// move the joining player directly to nf for redrafting.
ForceTeam(client,2);
}
else
{
// just autoassign the player if draft has been disabled.
FakeClientCommandEx(client, "jointeam 4");
}
joinTime[client] = -1;
}
joinTime[client] = -1;
}
batchJoinTime = 0;
...
...
dist/updater.txt
View file @
58053102
...
...
@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "0.9
7
"
"Latest" "0.9
8
"
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment