Commit c4160af4 authored by Mikleo's avatar Mikleo
Browse files

fix scenariovote command

parent 393f0763
Pipeline #10137 passed with stages
in 24 seconds
......@@ -10,7 +10,7 @@
#include <SteamWorks>
#define PluginVersion "1.14"
#define PluginVersion "1.15"
float pVersion;
// note linearmap field is unstable
......@@ -246,7 +246,7 @@ public void SetScenarioName(char[] scenarioName)
{
strcopy(currentScenario,sizeof(currentScenario),scenarioName);
if(sc_gamedesc_scenario != INVALID_HANDLE)
if(sc_gamedesc_scenario != INVALID_HANDLE && StrContains(currentScenario, "override", true) == -1)
{
sc_gamedesc_scenario.SetString(scenarioName);
}
......@@ -488,7 +488,6 @@ bool StartDefaultScenarioVote()
GetActingVoteListPath(path,sizeof(path));
kv.ImportFromFile(path);
kv.JumpToKey("scenarios");
kv.GotoFirstSubKey();
StartScenarioVote(kv);
delete kv;
}
......@@ -520,6 +519,8 @@ public bool StartScenarioVote(KeyValues kv)
int numOptions = 0;
int numPlayers = GetClientCount(true);
kv.GotoFirstSubKey();
do
{
......@@ -3710,8 +3711,7 @@ public Action Command_Scenario_Vote(int client, int args)
{
GetCmdArg(i, arg, sizeof(arg));
kv.JumpToKey(arg,true);
kv.SetString("tags_override","-");
kv.Rewind();
kv.GoBack();
}
StartScenarioVote(kv);
delete kv;
......
......@@ -4,7 +4,7 @@
{
"Version"
{
"Latest" "1.14"
"Latest" "1.15"
}
}
......
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