Commit e8edb598 authored by argon.sun's avatar argon.sun

fix

parent 392ec59b
...@@ -432,8 +432,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -432,8 +432,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->ShowElement(mainGame->wLanWindow); mainGame->ShowElement(mainGame->wLanWindow);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
event_base_loopbreak(client_base); event_base_loopbreak(client_base);
if(exit_on_return) if(exit_on_return)
mainGame->device->closeDevice(); mainGame->device->closeDevice();
break; break;
} }
case STOC_REPLAY: { case STOC_REPLAY: {
...@@ -533,12 +533,23 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -533,12 +533,23 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
switch(mainGame->dInfo.curMsg) { switch(mainGame->dInfo.curMsg) {
case MSG_RETRY: { case MSG_RETRY: {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->stACMessage->setText(L"Error occurs."); mainGame->stMessage->setText(L"Error occurs.");
mainGame->PopupElement(mainGame->wACMessage, 100); mainGame->PopupElement(mainGame->wMessage);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(120); mainGame->actionSignal.Reset();
if(!mainGame->dInfo.isReplay) mainGame->actionSignal.Wait();
mainGame->dInfo.isStarted = false; mainGame->gMutex.Lock();
mainGame->CloseDuelWindow();
mainGame->dInfo.isStarted = false;
mainGame->btnCreateHost->setEnabled(true);
mainGame->btnJoinHost->setEnabled(true);
mainGame->btnJoinCancel->setEnabled(true);
mainGame->device->setEventReceiver(&mainGame->menuHandler);
mainGame->ShowElement(mainGame->wLanWindow);
mainGame->gMutex.Unlock();
event_base_loopbreak(client_base);
if(exit_on_return)
mainGame->device->closeDevice();
return false; return false;
} }
case MSG_HINT: { case MSG_HINT: {
...@@ -990,7 +1001,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) { ...@@ -990,7 +1001,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
if (pcard->location == LOCATION_REMOVED) if (pcard->location == LOCATION_REMOVED)
mainGame->dField.remove_act = true; mainGame->dField.remove_act = true;
} }
if(mainGame->ignore_chain || ((count == 0 || specount == 0) && !mainGame->always_chain)) { if(!forced && (mainGame->ignore_chain || ((count == 0 || specount == 0) && !mainGame->always_chain))) {
SetResponseI(-1); SetResponseI(-1);
mainGame->dField.ClearChainSelect(); mainGame->dField.ClearChainSelect();
if(mainGame->chkWaitChain->isChecked()) { if(mainGame->chkWaitChain->isChecked()) {
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
antialias = 2 antialias = 2
nickname = Player nickname = Player
gamename = Game gamename = Game
lastdeck = test lastdeck = chaosls
textfont = c:/windows/fonts/simsun.ttc 14 textfont = c:/windows/fonts/simsun.ttc 14
numfont = c:/windows/fonts/arialbd.ttf numfont = c:/windows/fonts/arialbd.ttf
serverport = 7911 serverport = 7911
lastip = 192.168.3.235 lastip = 192.168.2.100
lastport = 7911 lastport = 7911
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