mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
arrow crash fix. this fixes bug #0000001
This commit is contained in:
parent
a5f678bc3d
commit
8fea71782d
5 changed files with 38 additions and 13 deletions
|
|
@ -9,10 +9,14 @@ ArrowTarget::ArrowTarget(Player *_owner, QGraphicsItem *parent)
|
|||
|
||||
ArrowTarget::~ArrowTarget()
|
||||
{
|
||||
while (!arrowsFrom.isEmpty())
|
||||
arrowsFrom.first()->getPlayer()->delArrow(arrowsFrom.first()->getId());
|
||||
while (!arrowsTo.isEmpty())
|
||||
arrowsTo.first()->getPlayer()->delArrow(arrowsTo.first()->getId());
|
||||
for (int i = 0; i < arrowsFrom.size(); ++i) {
|
||||
arrowsFrom[i]->setStartItem(0);
|
||||
arrowsFrom[i]->delArrow();
|
||||
}
|
||||
for (int i = 0; i < arrowsTo.size(); ++i) {
|
||||
arrowsTo[i]->setTargetItem(0);
|
||||
arrowsTo[i]->delArrow();
|
||||
}
|
||||
}
|
||||
|
||||
void ArrowTarget::setBeingPointedAt(bool _beingPointedAt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue