Commit 75889e7b authored by argon.sun's avatar argon.sun

client

parent 339d756b
......@@ -454,7 +454,6 @@ void ClientField::ReplaySwap() {
(*cit)->is_moving = false;
}
mainGame->dInfo.is_first_turn = !mainGame->dInfo.is_first_turn;
std::swap(mainGame->dInfo.is_host_player[0], mainGame->dInfo.is_host_player[1]);
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]);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -10,6 +10,7 @@
#include "network.h"
#include "data_manager.h"
#include "deck_manager.h"
#include "../ocgcore/mtrandom.h"
namespace ygo {
......@@ -17,7 +18,6 @@ class DuelClient {
private:
static unsigned int connect_state;
static unsigned char response_buf[64];
static bool is_responseB;
static unsigned char response_len;
static event_base* client_base;
static bufferevent* client_bev;
......@@ -25,7 +25,8 @@ private:
static char duel_client_write[0x2000];
static bool is_closing;
static int select_hint;
static wchar_t event_string[128];
static wchar_t event_string[256];
static mtrandom rnd;
public:
static bool StartClient(unsigned int ip, unsigned short port, bool create_game = true);
static void StopClient(bool is_exiting = false);
......@@ -36,6 +37,7 @@ public:
static int ClientAnalyze(char* msg, unsigned int len);
static void SetResponseI(int respI);
static void SetResponseB(unsigned char* respB, unsigned char len);
static void SendResponse();
static void SendPacketToServer(unsigned char proto) {
char* p = duel_client_write;
BufferIO::WriteInt16(p, 1);
......
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