Commit 068c2311 authored by edo9300's avatar edo9300

Fixed mutex in msg_Start

parent 8e433afc
...@@ -1393,14 +1393,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1393,14 +1393,13 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->dField.Initial(mainGame->LocalPlayer(1), deckc, extrac); mainGame->dField.Initial(mainGame->LocalPlayer(1), deckc, extrac);
mainGame->dInfo.turn = 0; mainGame->dInfo.turn = 0;
mainGame->dInfo.is_shuffling = false; mainGame->dInfo.is_shuffling = false;
if (!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping)
mainGame->gMutex.Unlock();
if(mainGame->dInfo.isReplaySwapped) { if(mainGame->dInfo.isReplaySwapped) {
std::swap(mainGame->dInfo.hostname, mainGame->dInfo.clientname); std::swap(mainGame->dInfo.hostname, mainGame->dInfo.clientname);
mainGame->dInfo.isReplaySwapped = false; mainGame->dInfo.isReplaySwapped = false;
mainGame->dField.ReplaySwap(); mainGame->dField.ReplaySwap();
} }
mainGame->gMutex.Unlock(); if (!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping)
mainGame->gMutex.Unlock();
return true; return true;
} }
case MSG_UPDATE_DATA: { case MSG_UPDATE_DATA: {
......
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