Commit 7df81d08 authored by nanahira's avatar nanahira

shrink condition

parent 2cc2ad72
......@@ -1738,8 +1738,9 @@ void SingleDuel::GetResponse(DuelPlayer* dp, void* pdata, unsigned int len) {
#ifdef YGOPRO_SERVER_MODE
if(len >= 4 && time_limit[dp->type] < host_info.time_limit) {
int resp = *(int*)pdata;
if((curMsg == MSG_SELECT_IDLECMD && (resp & 0xffff) != 8)
|| (curMsg == MSG_SELECT_BATTLECMD)
int rest = resp & 0xffff;
if((curMsg == MSG_SELECT_IDLECMD && rest < 6)
|| (curMsg == MSG_SELECT_BATTLECMD && rest < 2)
|| (curMsg == MSG_SELECT_CHAIN && resp != -1)
)
++time_limit[dp->type];
......
......@@ -1808,8 +1808,9 @@ void TagDuel::GetResponse(DuelPlayer* dp, void* pdata, unsigned int len) {
int resp_type = dp->type < 2 ? 0 : 1;
if(len >= 4 && time_limit[resp_type] < host_info.time_limit) {
int resp = *(int*)pdata;
if((curMsg == MSG_SELECT_IDLECMD && (resp & 0xffff) != 8)
|| (curMsg == MSG_SELECT_BATTLECMD)
int rest = resp & 0xffff;
if((curMsg == MSG_SELECT_IDLECMD && rest < 6)
|| (curMsg == MSG_SELECT_BATTLECMD && rest < 2)
|| (curMsg == MSG_SELECT_CHAIN && resp != -1)
)
++time_limit[resp_type];
......
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