Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion gframe/single_duel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +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)
Comment thread
salix5 marked this conversation as resolved.
Outdated
return;
if(dp->state != CTOS_HAND_RESULT)
return;
if(hand_result[dp->type])
return;
hand_result[dp->type] = res;
if(hand_result[0] && hand_result[1]) {
STOC_HandResult schr;
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