Commit 9e2d46b2 authored by mercury233's avatar mercury233 Committed by GitHub

fix ClientCard::SetCode (#2963)

parent 1d59451c
...@@ -32,14 +32,15 @@ ClientCard::~ClientCard() { ...@@ -32,14 +32,15 @@ ClientCard::~ClientCard() {
overlayed.clear(); overlayed.clear();
} }
void ClientCard::SetCode(unsigned int x) { void ClientCard::SetCode(unsigned int x) {
if((location == LOCATION_HAND) && (code != x)) { if (code == x) {
code = x; return;
}
if (x == 0) {
chain_code = code;
}
code = x;
if (location == LOCATION_HAND) {
mainGame->dField.MoveCard(this, 5); mainGame->dField.MoveCard(this, 5);
} else {
if (x == 0 && code != 0) {
chain_code = code;
}
code = x;
} }
} }
void ClientCard::UpdateInfo(unsigned char* buf) { void ClientCard::UpdateInfo(unsigned char* buf) {
......
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