Commit c4160af4 authored by Mikleo's avatar Mikleo

fix scenariovote command

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