Commit 4580cf55 authored by VanillaSalt's avatar VanillaSalt

fix replay mode

parent 78dd1715
......@@ -633,10 +633,9 @@ void ClientField::ReplaySwap() {
}
mainGame->dInfo.isFirst = !mainGame->dInfo.isFirst;
std::swap(mainGame->dInfo.lp[0], mainGame->dInfo.lp[1]);
for(int i = 0; i < 16; ++i)
std::swap(mainGame->dInfo.strLP[0][i], mainGame->dInfo.strLP[1][i]);
for(int i = 0; i < 20; ++i)
std::swap(mainGame->dInfo.hostname[i], mainGame->dInfo.clientname[i]);
std::swap(mainGame->dInfo.strLP[0], mainGame->dInfo.strLP[1]);
std::swap(mainGame->dInfo.hostname, mainGame->dInfo.clientname);
std::swap(mainGame->dInfo.hostname_tag, mainGame->dInfo.clientname_tag);
for(auto chit = chains.begin(); chit != chains.end(); ++chit) {
chit->controler = 1 - chit->controler;
GetChainLocation(chit->controler, chit->location, chit->sequence, &chit->chain_pos);
......
......@@ -1026,6 +1026,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
ClientCard* pcard;
mainGame->dField.activatable_cards.clear();
mainGame->dField.activatable_descs.clear();
mainGame->dField.conti_cards.clear();
count = BufferIO::ReadInt8(pbuf);
for (int i = 0; i < count; ++i) {
code = BufferIO::ReadInt32(pbuf);
......@@ -1155,6 +1156,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
mainGame->dField.activatable_cards.clear();
mainGame->dField.activatable_descs.clear();
mainGame->dField.conti_cards.clear();
count = BufferIO::ReadInt8(pbuf);
for (int i = 0; i < count; ++i) {
code = BufferIO::ReadInt32(pbuf);
......
This diff is collapsed.
......@@ -33,6 +33,8 @@ public:
static void Pause(bool is_pause, bool is_step);
static bool ReadReplayResponse();
static int ReplayThread(void* param);
static bool StartDuel();
static void EndDuel();
static void Restart(bool refresh);
static void Undo();
static bool ReplayAnalyze(char* msg, unsigned int len);
......
Subproject commit a02235065040a6fa6ce44a37ddfba953e0de9e84
Subproject commit 18bfd81912b020e799832a6068481756929e51a8
Subproject commit ef47b28ebdcecb27007e749f7275febf92bd71f2
Subproject commit 0da9693357cd309e5539f853566b1ba3921866e0
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