1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00
This commit is contained in:
mateuszb
2010-07-15 11:28:06 +00:00
parent fffef1d740
commit bb5d765247

View File

@@ -371,6 +371,11 @@ void CReverseAnim::nextFrame()
owner->creDir[stackID] = !owner->creDir[stackID]; owner->creDir[stackID] = !owner->creDir[stackID];
const CStack * curs = owner->curInt->cb->battleGetStackByID(stackID, false); const CStack * curs = owner->curInt->cb->battleGetStackByID(stackID, false);
if(!curs)
{
endAnim();
return;
}
Point coords = CBattleHex::getXYUnitAnim(hex, owner->creDir[stackID], curs, owner); Point coords = CBattleHex::getXYUnitAnim(hex, owner->creDir[stackID], curs, owner);
owner->creAnims[stackID]->pos.x = coords.x; owner->creAnims[stackID]->pos.x = coords.x;
@@ -1298,6 +1303,10 @@ CBattleInterface::CBattleInterface(const CCreatureSet * army1, const CCreatureSe
CBattleInterface::~CBattleInterface() CBattleInterface::~CBattleInterface()
{ {
if (active) //dirty fix for #485
{
deactivate();
}
SDL_FreeSurface(background); SDL_FreeSurface(background);
SDL_FreeSurface(menu); SDL_FreeSurface(menu);
SDL_FreeSurface(amountNormal); SDL_FreeSurface(amountNormal);