Commit 81f62545 authored by 独孤朲's avatar 独孤朲 Committed by GitHub

Merge pull request #1907 from mercury233/patch-3

fix duel end when changing side
parents 6063e83d d428364e
......@@ -205,6 +205,11 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
DuelClient::SendBufferToServer(CTOS_UPDATE_DECK, deckbuf, pdeck - deckbuf);
break;
}
case BUTTON_MSG_OK: {
mainGame->HideElement(mainGame->wMessage);
mainGame->actionSignal.Set();
break;
}
case BUTTON_YES: {
mainGame->HideElement(mainGame->wQuery);
if(!mainGame->is_building || mainGame->is_siding)
......
......@@ -522,6 +522,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->closeDoneSignal.Wait();
mainGame->gMutex.Lock();
mainGame->dInfo.isStarted = false;
mainGame->is_building = false;
mainGame->wDeckEdit->setVisible(false);
mainGame->btnCreateHost->setEnabled(true);
mainGame->btnJoinHost->setEnabled(true);
mainGame->btnJoinCancel->setEnabled(true);
......
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