Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions gframe/single_duel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,12 @@ void SingleDuel::StartDuel(DuelPlayer* dp) {
duel_stage = DUEL_STAGE_FINGER;
}
void SingleDuel::HandResult(DuelPlayer* dp, unsigned char res) {
if(res > 3)
if(res == 0 || res > 3 || dp->state != CTOS_HAND_RESULT)
return;
if(dp->state != CTOS_HAND_RESULT)
auto player = dp->type;
if(hand_result[player])
return;
hand_result[dp->type] = res;
hand_result[player] = res;
if(hand_result[0] && hand_result[1]) {
STOC_HandResult schr;
schr.res1 = hand_result[0];
Expand Down
10 changes: 5 additions & 5 deletions gframe/tag_duel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,12 @@ void TagDuel::StartDuel(DuelPlayer* dp) {
duel_stage = DUEL_STAGE_FINGER;
}
void TagDuel::HandResult(DuelPlayer* dp, unsigned char res) {
if(res > 3 || dp->state != CTOS_HAND_RESULT)
if(res == 0 || res > 3 || dp->state != CTOS_HAND_RESULT)
Comment thread
salix5 marked this conversation as resolved.
return;
if(dp->type == 0)
hand_result[0] = res;
else
hand_result[1] = res;
auto player = (dp->type & 0x2) >> 1;
if(hand_result[player])
return;
hand_result[player] = res;
if(hand_result[0] && hand_result[1]) {
STOC_HandResult schr;
schr.res1 = hand_result[0];
Expand Down
Loading