Commit a013d06c authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents 6dc470fa f21c821e
No preview for this file type
......@@ -92,6 +92,7 @@ using namespace gui;
extern unsigned short PRO_VERSION;
extern int enable_log;
extern bool exit_on_return;
extern bool auto_watch_mode;
extern bool open_file;
extern wchar_t open_file_name[256];
extern bool bot_mode;
......
......@@ -728,14 +728,16 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->dInfo.isReplaySkiping = false;
mainGame->wSurrender->setVisible(false);
mainGame->stMessage->setText(dataManager.GetSysString(1500));
mainGame->PopupElement(mainGame->wMessage);
mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait();
mainGame->closeDoneSignal.Reset();
mainGame->closeSignal.Set();
mainGame->closeDoneSignal.Wait();
mainGame->gMutex.Lock();
if(!auto_watch_mode) {
mainGame->PopupElement(mainGame->wMessage);
mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait();
mainGame->closeDoneSignal.Reset();
mainGame->closeSignal.Set();
mainGame->closeDoneSignal.Wait();
mainGame->gMutex.Lock();
}
mainGame->dInfo.isStarted = false;
mainGame->dInfo.isFinished = true;
mainGame->dInfo.announce_cache.clear();
......@@ -2173,7 +2175,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
mainGame->WaitFrameSignal(5);
}
if (panel_confirm.size()) {
if (panel_confirm.size() && !auto_watch_mode) {
std::sort(panel_confirm.begin(), panel_confirm.end(), ClientCard::client_card_sort);
mainGame->gMutex.Lock();
mainGame->dField.selectable_cards = panel_confirm;
......
......@@ -10,6 +10,7 @@
int enable_log = 0;
#ifndef YGOPRO_SERVER_MODE
bool exit_on_return = false;
bool auto_watch_mode = false;
bool open_file = false;
wchar_t open_file_name[256] = L"";
bool bot_mode = false;
......@@ -168,6 +169,8 @@ int main(int argc, char* argv[]) {
} else if(!wcscmp(wargv[i], L"-k")) { // Keep on return
exit_on_return = false;
keep_on_return = true;
} else if(!wcscmp(wargv[i], L"--auto-watch")) { // Auto watch mode
auto_watch_mode = true;
} else if(!wcscmp(wargv[i], L"-d")) { // Deck
++i;
if(i + 1 < wargc) { // select deck
......
Subproject commit e57b95dc0820f7dd5d58d52115f533fd87b16f0a
Subproject commit 9ace9936831e4f5292173e15a6f4a22e1a46a153
......@@ -958,3 +958,4 @@
!setname 0x127 无限起动 無限起動
!setname 0x128 魔女术 ウィッチクラフト
!setname 0x129 咒眼 呪眼
!setname 0x130 恩底弥翁
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