Commit b21854b4 authored by mercury233's avatar mercury233

update

parent f5600dc0
...@@ -924,13 +924,13 @@ void Game::RefreshBot() { ...@@ -924,13 +924,13 @@ void Game::RefreshBot() {
continue; continue;
if(linebuf[0] == '!') { if(linebuf[0] == '!') {
BotInfo newinfo; BotInfo newinfo;
sscanf(linebuf, "!%s[^\n]", strbuf); sscanf(linebuf, "!%240[^\n]", strbuf);
BufferIO::DecodeUTF8(strbuf, newinfo.internalname); BufferIO::DecodeUTF8(strbuf, newinfo.internalname);
fgets(linebuf, 256, fp); fgets(linebuf, 256, fp);
sscanf(linebuf, "%s[^\n]", strbuf); sscanf(linebuf, "%240[^\n]", strbuf);
BufferIO::DecodeUTF8(strbuf, newinfo.name); BufferIO::DecodeUTF8(strbuf, newinfo.name);
fgets(linebuf, 256, fp); fgets(linebuf, 256, fp);
sscanf(linebuf, "%s[^\n]", strbuf); sscanf(linebuf, "%240[^\n]", strbuf);
BufferIO::DecodeUTF8(strbuf, newinfo.desc); BufferIO::DecodeUTF8(strbuf, newinfo.desc);
fgets(linebuf, 256, fp); fgets(linebuf, 256, fp);
sscanf(linebuf, "%d", &newinfo.flag); sscanf(linebuf, "%d", &newinfo.flag);
......
...@@ -69,9 +69,9 @@ struct DuelInfo { ...@@ -69,9 +69,9 @@ struct DuelInfo {
}; };
struct BotInfo { struct BotInfo {
wchar_t internalname[32]; wchar_t internalname[256];
wchar_t name[32]; wchar_t name[32];
wchar_t desc[32]; wchar_t desc[256];
int flag; int flag;
}; };
......
...@@ -253,7 +253,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -253,7 +253,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
si.cb = sizeof(si); si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi)); ZeroMemory(&pi, sizeof(pi));
LPTSTR cmd = new TCHAR[MAX_PATH]; LPTSTR cmd = new TCHAR[MAX_PATH];
myswprintf(cmd, L"Bot.exe %d \"%s\"", (mainGame->chkBotHand->isChecked() ? 1 : 0), mainGame->botInfo[sel].internalname); myswprintf(cmd, L"Bot.exe \"%s\" %d %d", mainGame->botInfo[sel].internalname, (mainGame->chkBotHand->isChecked() ? 1 : 0), mainGame->gameConf.serverport);
if(!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) if(!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
{ {
NetServer::StopServer(); NetServer::StopServer();
......
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
!system 1382 人机信息: !system 1382 人机信息:
!system 1383 使用旧规则(大师规则3) !system 1383 使用旧规则(大师规则3)
!system 1384 电脑锁定出剪刀 !system 1384 电脑锁定出剪刀
!system 1385 列表为空,可能未安装人机 !system 1385 列表为空,可能未安装合适的人机
!system 1390 等待行动中... !system 1390 等待行动中...
!system 1391 等待行动中.... !system 1391 等待行动中....
!system 1392 等待行动中..... !system 1392 等待行动中.....
......
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