File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -354,11 +354,12 @@ void SingleDuel::StartDuel(DuelPlayer* dp) {
354354 duel_stage = DUEL_STAGE_FINGER ;
355355}
356356void SingleDuel::HandResult (DuelPlayer* dp, unsigned char res) {
357- if (res > 3 )
357+ if (res == 0 || res > 3 || dp-> state != CTOS_HAND_RESULT )
358358 return ;
359- if (dp->state != CTOS_HAND_RESULT )
359+ auto player = dp->type ;
360+ if (hand_result[player])
360361 return ;
361- hand_result[dp-> type ] = res;
362+ hand_result[player ] = res;
362363 if (hand_result[0 ] && hand_result[1 ]) {
363364 STOC_HandResult schr;
364365 schr.res1 = hand_result[0 ];
Original file line number Diff line number Diff line change @@ -320,12 +320,12 @@ void TagDuel::StartDuel(DuelPlayer* dp) {
320320 duel_stage = DUEL_STAGE_FINGER ;
321321}
322322void TagDuel::HandResult (DuelPlayer* dp, unsigned char res) {
323- if (res > 3 || dp->state != CTOS_HAND_RESULT )
323+ if (res == 0 || res > 3 || dp->state != CTOS_HAND_RESULT )
324324 return ;
325- if (dp->type == 0 )
326- hand_result[0 ] = res;
327- else
328- hand_result[1 ] = res;
325+ auto player = (dp->type & 0x2 ) >> 1 ;
326+ if ( hand_result[player])
327+ return ;
328+ hand_result[player ] = res;
329329 if (hand_result[0 ] && hand_result[1 ]) {
330330 STOC_HandResult schr;
331331 schr.res1 = hand_result[0 ];
You can’t perform that action at this time.
0 commit comments