Commit 79ed1214 authored by edo9300's avatar edo9300

Fix for single mode

parent 2745f5ab
......@@ -3176,6 +3176,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
case MSG_RELOAD_FIELD: {
mainGame->gMutex.Lock();
mainGame->dField.Clear();
mainGame->dInfo.duel_rule = BufferIO::ReadInt8(pbuf);
int val = 0;
for(int i = 0; i < 2; ++i) {
int p = mainGame->LocalPlayer(i);
......@@ -3291,7 +3292,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
myswprintf(event_string, dataManager.GetSysString(1609), dataManager.GetName(mainGame->dField.current_chain.code));
mainGame->dField.last_chain = true;
}
mainGame->dInfo.duel_rule = BufferIO::ReadInt8(pbuf);
mainGame->gMutex.Unlock();
break;
}
......
......@@ -632,6 +632,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
case MSG_RELOAD_FIELD: {
mainGame->gMutex.Lock();
mainGame->dField.Clear();
mainGame->dInfo.duel_rule = BufferIO::ReadInt8(pbuf);
int val = 0;
for(int p = 0; p < 2; ++p) {
mainGame->dInfo.lp[p] = BufferIO::ReadInt32(pbuf);
......@@ -694,7 +695,6 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
BufferIO::ReadInt8(pbuf); //chain count, always 0
SinglePlayReload();
mainGame->dField.RefreshAllCards();
mainGame->dInfo.duel_rule = BufferIO::ReadInt8(pbuf);
mainGame->gMutex.Unlock();
break;
}
......
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