- Fix for issue 650 (tidal Warrior effect doesn't end at end of turn)

- Fix PSP compilation
This commit is contained in:
wagic.the.homebrew
2011-05-07 04:10:47 +00:00
parent 062d5f9485
commit f96635541d
8 changed files with 50 additions and 2 deletions

View File

@@ -28,6 +28,11 @@ int ActionLayer::removeFromGame(ActionElement * e)
if (isWaitingForAnswer() == e)
setCurrentWaitingAction(NULL);
e->destroy();
i = getIndexOf(e); //the destroy event might have changed the contents of mObjects, so we get the index again
if (i == -1)
return 0; //Should not happen, it means we deleted thesame object twice?
mObjects.erase(mObjects.begin() + i);
mCount--;
return 1;