fixed a crash with flip cards. how does the test for this pass?
This commit is contained in:
@@ -1763,7 +1763,7 @@ int AAFlip::resolve()
|
||||
if (a->oneShot)
|
||||
{
|
||||
a->resolve();
|
||||
delete (a);
|
||||
SAFE_DELETE(a);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1823,7 +1823,9 @@ int AAFlip::testDestroy()
|
||||
if(_target->isFlipped)
|
||||
{
|
||||
this->forceDestroy = 1;
|
||||
_target->getObserver()->removeObserver(this);
|
||||
//_target->getObserver()->removeObserver(this);
|
||||
//originally added as a safegaurd to insure the ability was removed
|
||||
//it's been so long and so much has changed that it appears to do nothing but cause a crash now
|
||||
_target->isFlipped = false;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -691,20 +691,22 @@ void GameStateDuel::Update(float dt)
|
||||
case DUEL_STATE_CHOOSE_DECK2_TO_PLAY:
|
||||
if (mParent->players[1] == PLAYER_TYPE_HUMAN)
|
||||
{
|
||||
if (deckmenu->isClosed())
|
||||
if (deckmenu && deckmenu->isClosed())
|
||||
setGamePhase(DUEL_STATE_PLAY);
|
||||
else
|
||||
deckmenu->Update(dt);
|
||||
if(deckmenu)
|
||||
deckmenu->Update(dt);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (opponentMenu->isClosed())
|
||||
if (opponentMenu && opponentMenu->isClosed())
|
||||
{
|
||||
setGamePhase(DUEL_STATE_PLAY);
|
||||
SAFE_DELETE(opponentMenu);
|
||||
}
|
||||
else
|
||||
opponentMenu->Update(dt);
|
||||
if(opponentMenu)
|
||||
opponentMenu->Update(dt);
|
||||
}
|
||||
break;
|
||||
// this called after each match and tournament
|
||||
|
||||
Reference in New Issue
Block a user