mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
[Game][Arrows] ArrowItem should not send deletion game commands by itself (#6932)
Took 13 minutes Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
d2164c3f08
commit
98c00c55ed
3 changed files with 13 additions and 6 deletions
|
|
@ -402,7 +402,7 @@ void GameScene::onArrowCreateRequested(const ArrowData &data)
|
|||
auto *arrow = new ArrowItem(startView->getPlayer(), data.id, startCard, targetItem, data.color);
|
||||
addItem(arrow);
|
||||
arrowRegistry.insert(data.id, arrow);
|
||||
connect(arrow, &QObject::destroyed, this, [this, id = data.id]() { arrowRegistry.remove(id); });
|
||||
connect(arrow, &ArrowItem::requestDeletion, this, &GameScene::onArrowDeleteRequested);
|
||||
}
|
||||
|
||||
void GameScene::onArrowDeleted(int arrowId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue