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
8ee4dfd8
Commit
8ee4dfd8
authored
Jul 08, 2019
by
Mikleo
Browse files
fix joining players joining BE after restarting draft.
parent
a606db96
Pipeline
#6214
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 @
8ee4dfd8
No preview for this file type
dist/addons/sourcemod/scripting/draftpick.sp
View file @
8ee4dfd8
...
...
@@ -8,7 +8,7 @@
#include <empstats>
#include <updater>
#define PluginVersion "0.9
2
"
#define PluginVersion "0.9
3
"
#define UPDATE_URL "https://sourcemod.docs.empiresmod.com/DraftPick/dist/updater.txt"
...
...
@@ -254,8 +254,9 @@ public void OnPluginStart()
dp_music_volume = CreateConVar("dp_music_volume", "0.5", "The volume music plays at");
dp_music.AddChangeHook(dp_music_changed);
dp_music_volume.AddChangeHook(dp_music_volume_changed);
dp_pick_music = CreateConVar("dp_pick_music", "draftpick/draft_pick2.mp3","");
dp_pick_music_repeat = CreateConVar("dp_pick_music_repeat", "102","");
// use pre included music to save download table time.
dp_pick_music = CreateConVar("dp_pick_music", "music/our_obdurate_past.mp3","");
dp_pick_music_repeat = CreateConVar("dp_pick_music_repeat", "212","");
dp_pick_end_sound = CreateConVar("dp_pick_end_sound", "draftpick/draft_complete.mp3","");
dp_join_music = CreateConVar("dp_join_music", "", "");
dp_your_turn_sound = CreateConVar("dp_your_turn_sound", "draftpick/your_turn.wav", "");
...
...
@@ -463,6 +464,7 @@ public Action Command_RestartDraft(int client, int args)
}
else
{
// end the current draft and set up a new one.
draftBegun = false;
DraftEnded();
...
...
@@ -1856,7 +1858,7 @@ void SetUpDraft(mode)
if(!EU_HasGameStarted())
{
dp_in_draft.IntValue = 1;
// make sure everyone
is on
nf
// make sure everyone
on be is moved to
nf
for (int i=1; i<=MaxClients; i++)
{
if(IsClientInGame(i) && GetClientTeam(i) == 3)
...
...
@@ -1865,6 +1867,22 @@ void SetUpDraft(mode)
}
}
// put any currently joining players in nf, mainly used for restarting draft.
for(int i = 0;i<joiningPlayers.Length;i++)
{
int client = joiningPlayers.Get(i);
if(IsClientInGame(i))
{
ForceTeam(i,2);
joinTime[client] = -1;
}
}
joiningPlayers.Clear();
// disable ncev until we can start the game.
AddCommandListener(Command_Join_Squad_Draft, "emp_squad_join");
...
...
@@ -4517,6 +4535,7 @@ public Action Command_DraftMusic(int client, int args)
public Action Command_ReloadDraftMusic(int client, int args)
{
LoadDraftMusic();
return Plugin_Handled;
}
public Action Timer_CheckForceAuto(Handle timer,any dataPack)
...
...
dist/updater.txt
View file @
8ee4dfd8
...
...
@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "0.9
2
"
"Latest" "0.9
3
"
}
}
...
...
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