safing up countercost related items, some possible crashes were found now that counter cost can be targeted. they should have really been there from the start.

This commit is contained in:
omegablast2002@yahoo.com
2011-09-14 12:20:46 +00:00
parent 5ece26d49a
commit 9c9ce69259

View File

@@ -621,6 +621,8 @@ int CounterCost::isPaymentSet()
int CounterCost::canPay()
{
// if target needs to be chosen, then move on.
if(!target)
return 0;
if (tc)
return 1;
if (counter->nb >= 0)
@@ -758,7 +760,8 @@ int ExtraCosts::canPay()
{
if (!costs[i]->canPay())
{
costs[i]->target->isExtraCostTarget = false;
if(costs[i]->target)
costs[i]->target->isExtraCostTarget = false;
return 0;
}
}