Commit 203011d5 authored by Chen Bill's avatar Chen Bill

fix DuelInfo.Clear()

parent 9458fd09
...@@ -1190,7 +1190,6 @@ int DuelClient::ClientAnalyze(unsigned char* msg, unsigned int len) { ...@@ -1190,7 +1190,6 @@ int DuelClient::ClientAnalyze(unsigned char* msg, unsigned int len) {
mainGame->showcard = 0; mainGame->showcard = 0;
mainGame->gMutex.lock(); mainGame->gMutex.lock();
mainGame->dField.Clear(); mainGame->dField.Clear();
mainGame->dInfo.Clear();
int playertype = BufferIO::ReadInt8(pbuf); int playertype = BufferIO::ReadInt8(pbuf);
mainGame->dInfo.isFirst = (playertype & 0xf) ? false : true; mainGame->dInfo.isFirst = (playertype & 0xf) ? false : true;
if(playertype & 0xf0) if(playertype & 0xf0)
......
...@@ -32,6 +32,7 @@ int SingleMode::SinglePlayThread() { ...@@ -32,6 +32,7 @@ int SingleMode::SinglePlayThread() {
const int start_lp = 8000; const int start_lp = 8000;
const int start_hand = 5; const int start_hand = 5;
const int draw_count = 1; const int draw_count = 1;
mainGame->dInfo.Clear();
int opt = 0; int opt = 0;
std::random_device rd; std::random_device rd;
unsigned int seed = rd(); unsigned int seed = rd();
...@@ -92,7 +93,6 @@ int SingleMode::SinglePlayThread() { ...@@ -92,7 +93,6 @@ int SingleMode::SinglePlayThread() {
mainGame->btnLeaveGame->setText(dataManager.GetSysString(1210)); mainGame->btnLeaveGame->setText(dataManager.GetSysString(1210));
mainGame->wPhase->setVisible(true); mainGame->wPhase->setVisible(true);
mainGame->dField.Clear(); mainGame->dField.Clear();
mainGame->dInfo.Clear();
mainGame->dInfo.isFirst = true; mainGame->dInfo.isFirst = true;
mainGame->dInfo.isStarted = true; mainGame->dInfo.isStarted = true;
mainGame->dInfo.isFinished = false; mainGame->dInfo.isFinished = false;
......
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