Commit 2fd170cd authored by perfectdicky's avatar perfectdicky

fix ai not run for non 自选ai

parent 96450ae0
......@@ -179,8 +179,11 @@ public class AIRoom : WindowServantSP
serverProcess.StartInfo.RedirectStandardOutput = true;
serverProcess.Start();
string port = serverProcess.StandardOutput.ReadLine();
command += " Port=" + port + " DeckFile=\"deck/" + aideck_.GetComponent<UIPopupList>().value + ".ydk\"";
command += " Port=" + port;
//add aideck to ai only for 自选ai
int sel = superScrollView.selectedIndex;
if (sel >= 0 && sel < Bots.Count && Array.IndexOf(Bots[sel].flags, "SELECT_DECKFILE") >= 0)
command += " DeckFile=\"deck/" + aideck_.GetComponent<UIPopupList>().value + ".ydk\"";
botProcess = new System.Diagnostics.Process();
botProcess.StartInfo.UseShellExecute = false;
botProcess.StartInfo.FileName = Directory.GetCurrentDirectory() + "/WindBot/WindBot.exe";
......
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