Skip to content

Commit 9ab36ec

Browse files
authored
workaround fix for handling overlay cards during reconnection (#3076)
1 parent 8cab24c commit 9ab36ec

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

gframe/client_card.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@ void ClientCard::UpdateInfo(unsigned char* buf) {
141141
if(flag & QUERY_OVERLAY_CARD) {
142142
int count = BufferIO::Read<int32_t>(buf);
143143
for(int i = 0; i < count; ++i) {
144+
if(i >= overlayed.size()) {
145+
ClientCard* xcard = new ClientCard;
146+
overlayed.push_back(xcard);
147+
mainGame->dField.overlay_cards.insert(xcard);
148+
xcard->overlayTarget = this;
149+
xcard->location = LOCATION_OVERLAY;
150+
xcard->sequence = (unsigned char)(overlayed.size() - 1);
151+
xcard->owner = controler; // not accurate
152+
xcard->controler = controler;
153+
}
144154
overlayed[i]->SetCode(BufferIO::Read<int32_t>(buf));
145155
}
146156
}

0 commit comments

Comments
 (0)