Fix memory leak in ATransforms ability
- Blame is on me for the bad design behind the "isClone" flag, I need to get rid of that flag in the long term.
This commit is contained in:
@@ -22,9 +22,8 @@ class ActionElement: public JGuiObject
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
int activeState;
|
int activeState;
|
||||||
|
|
||||||
public:
|
|
||||||
int isClone;
|
int isClone;
|
||||||
|
public:
|
||||||
TargetChooser * tc;
|
TargetChooser * tc;
|
||||||
int currentPhase;
|
int currentPhase;
|
||||||
int newPhase;
|
int newPhase;
|
||||||
|
|||||||
@@ -2561,7 +2561,6 @@ int ATransformer::addToGame()
|
|||||||
MTGAbility * aNew = af.parseMagicLine(newAbilitiesList[k], 0, NULL, _target);
|
MTGAbility * aNew = af.parseMagicLine(newAbilitiesList[k], 0, NULL, _target);
|
||||||
if(!aNew)
|
if(!aNew)
|
||||||
continue;
|
continue;
|
||||||
aNew->isClone = 1;
|
|
||||||
GenericTargetAbility * gta = dynamic_cast<GenericTargetAbility*> (aNew);
|
GenericTargetAbility * gta = dynamic_cast<GenericTargetAbility*> (aNew);
|
||||||
if (gta)
|
if (gta)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user