Commit 7dcc1b1d authored by nanahira's avatar nanahira

Merge branch 'master' into another

parents e8698c3b 95b8cf6b
......@@ -4,7 +4,7 @@ os:
- osx
sudo: required
dist: bionic
osx_image: xcode9.4
osx_image: xcode10.3
addons:
ssh_known_hosts:
- github.com
......@@ -86,7 +86,7 @@ before_deploy:
7z a -mx9 -xr!.git* KoishiPro-$TRAVIS_OS_NAME-$TRAVIS_TAG.zip ygopro.app;
fi
- curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://cdn01.moecube.com/images/ygopro-images-zh-CN.zip
- curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://s.my-card.in:444/images/ygopro-images-zh-CN.zip
- 7z x -y -opics ygopro-images-zh-CN.zip > /dev/null
- curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/moecube/ygopro-starter-pack/archive/master.zip
......
......@@ -59,7 +59,7 @@ after_build:
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/purerosefallen/windbot/releases/download/latest/WindBot.7z ; exit 0"
- 7z x -y WindBot.7z
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://cdn01.moecube.com/images/ygopro-images-zh-CN.zip ; exit 0"
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://s.my-card.in:444/images/ygopro-images-zh-CN.zip ; exit 0"
- 7z x -y -opics ygopro-images-zh-CN.zip
- bash -c "curl --retry 5 --connect-timeout 30 --location --remote-header-name --remote-name https://github.com/purerosefallen/update-koishipro/archive/master.zip ; exit 0"
......
......@@ -1045,6 +1045,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;
......
......@@ -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 += 2;
break;
}
case MSG_RETRY: {
if(mainGame->dInfo.isReplaySkiping) {
mainGame->dInfo.isReplaySkiping = false;
......
......@@ -586,6 +586,17 @@ int SingleDuel::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(players[last_response], STOC_GAME_MSG, offset, pbuf - offset);
......
......@@ -182,6 +182,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();
......
......@@ -550,6 +550,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);
......
Subproject commit 9895a5da2ee82f17ac898d8c495bde4f777e1484
Subproject commit 1eedc8d1b7e4b36f7a78431351238b330b723aad
Subproject commit 7cbcd346ace1c116d1e90e2d1d1e1e68e25ec98e
Subproject commit df1137c1d9ca27697cc9be63da50191df629a158
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