mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Since filename extensions are omitted, GARRISON.TXT was hiding GARRISON.BMP. I've added a crude workaround (ignore the first file since it's not used).
Fixed #613.
This commit is contained in:
@@ -2921,18 +2921,19 @@ void CBattleInterface::activateStack()
|
||||
{
|
||||
activeStack = stackToActivate;
|
||||
stackToActivate = -1;
|
||||
const CStack *s = LOCPLINT->cb->battleGetStackByID(activeStack);
|
||||
|
||||
myTurn = true;
|
||||
if(attackerInt && defenderInt) //hotseat -> need to pick which interface "takes over" as active
|
||||
curInt = attackerInt->playerID == LOCPLINT->cb->battleGetStackByID(activeStack)->owner ? attackerInt : defenderInt;
|
||||
curInt = attackerInt->playerID == s->owner ? attackerInt : defenderInt;
|
||||
|
||||
queue->update();
|
||||
redrawBackgroundWithHexes(activeStack);
|
||||
bWait->block(vstd::contains(curInt->cb->battleGetStackByID(activeStack)->state, WAITING)); //block waiting button if stack has been already waiting
|
||||
bWait->block(vstd::contains(s->state, WAITING)); //block waiting button if stack has been already waiting
|
||||
|
||||
//block cast spell button if hero doesn't have a spellbook
|
||||
bSpell->block(!curInt->cb->battleCanCastSpell());
|
||||
bSurrender->block(!curInt->cb->battleCanFlee());
|
||||
bSurrender->block((curInt == attackerInt ? defendingHeroInstance : attackingHeroInstance) == NULL);
|
||||
bFlee->block(!curInt->cb->battleCanFlee());
|
||||
|
||||
GH.fakeMouseMove();
|
||||
|
@@ -385,7 +385,7 @@ private:
|
||||
CBattleHero * attackingHero, * defendingHero; //fighting heroes
|
||||
CStackQueue *queue;
|
||||
CCreatureSet army1, army2; //copy of initial armies (for result window)
|
||||
CGHeroInstance * attackingHeroInstance, * defendingHeroInstance;
|
||||
const CGHeroInstance * attackingHeroInstance, * defendingHeroInstance;
|
||||
std::map< int, CCreatureAnimation * > creAnims; //animations of creatures from fighting armies (order by BattleInfo's stacks' ID)
|
||||
std::map< int, CDefHandler * > idToProjectile; //projectiles of creatures (creatureID, defhandler)
|
||||
std::map< int, CDefHandler * > idToObstacle; //obstacles located on the battlefield
|
||||
|
@@ -243,6 +243,9 @@ void CLodHandler::init(std::string lodFile, std::string dirName)
|
||||
std::transform(entry.nameStr.begin(), entry.nameStr.end(),
|
||||
entry.nameStr.begin(), toupper);
|
||||
|
||||
if(entry.nameStr == "GARRISON.TXT") //crude workaround -> there are both GARRISON.TXT and GARRSION.BMP, since we ommit extensions, first one (not used by VCMI) would overwrite the second
|
||||
continue;
|
||||
|
||||
size_t dotPos = entry.nameStr.find_last_of('.');
|
||||
if ( dotPos < entry.nameStr.size() )
|
||||
{
|
||||
|
Reference in New Issue
Block a user