1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-21 21:17:49 +02:00
Checking for water availability won't cause spurious warnings. New creature window enabled for testing.
This commit is contained in:
Michał W. Urbańczyk 2011-05-25 14:48:49 +00:00
parent 601bee9c0f
commit 8e57dba850
5 changed files with 17 additions and 13 deletions

View File

@ -8,12 +8,14 @@ GENERAL:
- Ambassador's Sash
TOWNS:
* Implemented animation for new town buildings
* It's possible to sell artifacts at Artifact Merchants
BATTLES:
* Neutral monsters will be splitted to multiple stacks
* Hero can surrender battle to keep army
* Support for Death Stare, Support for Poison, Age, Disease, Acid Breath
* Partial support for Stone Gaze, Paralyze, Mana drain

View File

@ -486,6 +486,8 @@ void CPlayerInterface::heroVisitsTown(const CGHeroInstance* hero, const CGTownIn
{
if(hero->tempOwner != playerID )
return;
waitWhileDialog();
boost::unique_lock<boost::recursive_mutex> un(*pim);
openTownWindow(town);
}

View File

@ -13,6 +13,7 @@ clientSettings
defaultPlayerAI=GeniusAI;
neutralBattleAI=StupidAI;
showFPS=0;
classicCreatureWindow=0;
}
GUISettings
{

View File

@ -6313,8 +6313,7 @@ int3 IBoatGenerator::bestLocation() const
for (int i = 0; i < offsets.size(); ++i)
{
const TerrainTile *tile = IObjectInterface::cb->getTile(o->pos + offsets[i]);
if (tile) //tile is in the map
if (const TerrainTile *tile = IObjectInterface::cb->getTile(o->pos + offsets[i], false)) //tile is in the map
{
if (tile->tertype == TerrainTile::water && (!tile->blocked || tile->blockingObjects.front()->ID == 8)) //and is water and is not blocked or is blocked by boat
return o->pos + offsets[i];

View File

@ -1253,24 +1253,24 @@ DLL_EXPORT void StacksHealedOrResurrected::applyGs( CGameState *gs )
if(resurrected)
{
for (BonusList::iterator it = changedStack->bonuses.begin(); it != changedStack->bonuses.end(); it++)
{
if(VLC->spellh->spells[(*it)->sid]->positiveness < 0)
{
changedStack->bonuses.erase(it);
}
}
// for (BonusList::iterator it = changedStack->bonuses.begin(); it != changedStack->bonuses.end(); it++)
// {
// if(VLC->spellh->spells[(*it)->sid]->positiveness < 0)
// {
// changedStack->bonuses.erase(it);
// }
// }
//removing all features from negative spells
BonusList tmpFeatures = changedStack->bonuses;
changedStack->bonuses.clear();
//changedStack->bonuses.clear();
BOOST_FOREACH(Bonus *b, tmpFeatures)
{
const CSpell *s = b->sourceSpell();
if(s && s->positiveness >= 0)
if(s && s->positiveness < 0)
{
changedStack->addNewBonus(b);
changedStack->removeBonus(b);
}
}
}