Commit b6b54e7d authored by nanahira's avatar nanahira

Merge branch 'server' into 2pick

parents 78dc3b46 03404fa1
No preview for this file type
......@@ -1010,6 +1010,10 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
is_swapping = false;
}
switch(mainGame->dInfo.curMsg) {
case MSG_RESET_TIME: {
pbuf += 3;
break;
}
case MSG_RETRY: {
if(last_successful_msg_length) {
char* p = last_successful_msg;
......
......@@ -150,7 +150,7 @@ bool Game::Initialize() {
SetWindowsIcon();
//main menu
wchar_t strbuf[256];
myswprintf(strbuf, L"KoishiPro %X.0%X.%X IZANA", PRO_VERSION >> 12, (PRO_VERSION >> 4) & 0xff, PRO_VERSION & 0xf);
myswprintf(strbuf, L"KoishiPro %X.0%X.%X Replica", PRO_VERSION >> 12, (PRO_VERSION >> 4) & 0xff, PRO_VERSION & 0xf);
wMainMenu = env->addWindow(rect<s32>(370, 200, 650, 415), false, strbuf);
wMainMenu->getCloseButton()->setVisible(false);
btnLanMode = env->addButton(rect<s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200));
......
......@@ -310,6 +310,10 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
bool pauseable = true;
mainGame->dInfo.curMsg = BufferIO::ReadUInt8(pbuf);
switch (mainGame->dInfo.curMsg) {
case MSG_RESET_TIME: {
pbuf += 3;
break;
}
case MSG_RETRY: {
if(mainGame->dInfo.isReplaySkiping) {
mainGame->dInfo.isReplaySkiping = false;
......
......@@ -799,7 +799,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
}
case MSG_RESET_TIME: {
player = BufferIO::ReadInt8(pbuf);
int time = BufferIO::ReadInt8(pbuf);
short time = BufferIO::ReadInt16(pbuf);
if(host_info.time_limit) {
if(time)
time_limit[player] = time;
......
......@@ -181,6 +181,10 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
offset = pbuf;
mainGame->dInfo.curMsg = BufferIO::ReadUInt8(pbuf);
switch (mainGame->dInfo.curMsg) {
case MSG_RESET_TIME: {
pbuf += 3;
break;
}
case MSG_RETRY: {
if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) {
mainGame->singleSignal.Reset();
......
......@@ -703,6 +703,17 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
offset = pbuf;
unsigned char engType = BufferIO::ReadUInt8(pbuf);
switch (engType) {
case MSG_RESET_TIME: {
player = BufferIO::ReadInt8(pbuf);
short time = BufferIO::ReadInt16(pbuf);
if(host_info.time_limit) {
if(time)
time_limit[player] = time;
else
time_limit[player] = host_info.time_limit;
}
break;
}
case MSG_RETRY: {
WaitforResponse(last_response);
NetServer::SendBufferToPlayer(cur_player[last_response], STOC_GAME_MSG, offset, pbuf - offset);
......
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