Commit 013d3ad6 authored by VanillaSalt's avatar VanillaSalt

fix

parent 2f429255
......@@ -1202,15 +1202,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break;
}
case MSG_SELECT_SUM: {
if (!clicked_card)
if (!clicked_card || !clicked_card->is_selectable)
break;
if (clicked_card->is_selected) {
int i = 0;
while(selected_cards[i] != clicked_card) i++;
selected_cards.erase(selected_cards.begin() + i);
} else if (clicked_card->is_selectable)
auto it = std::find(selected_cards.begin(), selected_cards.end(), clicked_card);
selected_cards.erase(it);
} else
selected_cards.push_back(clicked_card);
else break;
if (CheckSelectSum()) {
if(selectsum_cards.size() == 0 || selectable_cards.size() == 0) {
SetResponseSelectedCards();
......
Subproject commit 6113e3d39e928e9ef3ba14272c5fa5ab7a23ebdb
Subproject commit e928c4f94a4848fa0b505836f53811683f53c84b
Subproject commit 2e9d77ab897bc9c892ecd13c87111bb0b48cb374
Subproject commit ecb824addcbadba2b0f2c063fa5b635759e527bb
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