1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

More bugfixing:

- Fixed compile in VCAI (precompiled headers should not include VCMI headers)
- Fixed crash on visiting observatories, including shroud of darkness
This commit is contained in:
Ivan Savenko 2014-06-29 17:23:06 +03:00
parent 917b1ffca8
commit 1157111fcf
5 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
#include "StdInc.h"
#include "AIUtility.h"
#include "VCAI.h"
#include "Fuzzy.h"
#include "../../lib/UnlockGuard.h"
#include "../../lib/CConfigHandler.h"

View File

@ -1,4 +1,2 @@
#pragma once
#include "../../Global.h"
#include "Fuzzy.h"

View File

@ -1,6 +1,8 @@
#include "StdInc.h"
#include "VCAI.h"
#include "Goals.h"
#include "Fuzzy.h"
#include "../../lib/UnlockGuard.h"
#include "../../lib/mapObjects/MapObjects.h"
#include "../../lib/CConfigHandler.h"

View File

@ -1061,7 +1061,7 @@ void CGObservatory::onHeroVisit( const CGHeroInstance * h ) const
case Obj::COVER_OF_DARKNESS:
{
iw.text.addTxt (MetaString::ADVOB_TXT, 31);
for (auto player : cb->gameState()->players)
for (auto & player : cb->gameState()->players)
{
if (cb->getPlayerStatus(player.first) == EPlayerStatus::INGAME &&
cb->getPlayerRelations(player.first, h->tempOwner) == PlayerRelations::ENEMIES)

View File

@ -1351,7 +1351,7 @@ void CGameHandler::newTurn()
}
if (t->hasBonusOfType (Bonus::DARKNESS))
{
for (auto player : gameState()->players)
for (auto & player : gameState()->players)
{
if (getPlayerStatus(player.first) == EPlayerStatus::INGAME &&
getPlayerRelations(player.first, t->tempOwner) == PlayerRelations::ENEMIES)