From 8e57dba850a2463a1e86a9c9f80e32a580e88c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= Date: Wed, 25 May 2011 14:48:49 +0000 Subject: [PATCH] Fixed #658 and #699. Checking for water availability won't cause spurious warnings. New creature window enabled for testing. --- ChangeLog | 4 +++- client/CPlayerInterface.cpp | 2 ++ config/settings.txt | 1 + lib/CObjectHandler.cpp | 3 +-- lib/NetPacksLib.cpp | 20 ++++++++++---------- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4715eab53..2a76839cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index 9e4c47039..1dd48c04f 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -486,6 +486,8 @@ void CPlayerInterface::heroVisitsTown(const CGHeroInstance* hero, const CGTownIn { if(hero->tempOwner != playerID ) return; + + waitWhileDialog(); boost::unique_lock un(*pim); openTownWindow(town); } diff --git a/config/settings.txt b/config/settings.txt index 4b1244fa3..38bbd7fb1 100644 --- a/config/settings.txt +++ b/config/settings.txt @@ -13,6 +13,7 @@ clientSettings defaultPlayerAI=GeniusAI; neutralBattleAI=StupidAI; showFPS=0; + classicCreatureWindow=0; } GUISettings { diff --git a/lib/CObjectHandler.cpp b/lib/CObjectHandler.cpp index 6b50025df..ba32346db 100644 --- a/lib/CObjectHandler.cpp +++ b/lib/CObjectHandler.cpp @@ -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]; diff --git a/lib/NetPacksLib.cpp b/lib/NetPacksLib.cpp index 2dfa44ffe..2a2272cf8 100644 --- a/lib/NetPacksLib.cpp +++ b/lib/NetPacksLib.cpp @@ -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); } } }