mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
commit
6f6f399911
@ -1369,7 +1369,6 @@ void VCAI::buildStructure(const CGTownInstance * t)
|
||||
//below algorithm focuses on economy growth at start of the game.
|
||||
TResources currentRes = cb->getResourceAmount();
|
||||
TResources currentIncome = t->dailyIncome();
|
||||
int townIncome = currentIncome[Res::GOLD];
|
||||
|
||||
if(tryBuildAnyStructure(t, std::vector<BuildingID>(essential, essential + ARRAY_COUNT(essential))))
|
||||
return;
|
||||
|
@ -1042,7 +1042,6 @@ void CPlayerInterface::battleAttack(const BattleAttack * ba)
|
||||
}
|
||||
else
|
||||
{
|
||||
auto attackFrom = actionTarget.at(0).hexValue;
|
||||
auto attackTarget = actionTarget.at(1).hexValue;
|
||||
|
||||
//TODO: use information from BattleAttack but not curAction
|
||||
@ -1336,7 +1335,7 @@ template <typename Handler> void CPlayerInterface::serializeTempl( Handler &h, c
|
||||
{
|
||||
if(version < 774 && !h.saving)
|
||||
{
|
||||
bool observerInDuelMode;
|
||||
bool observerInDuelMode = false;
|
||||
h & observerInDuelMode;
|
||||
}
|
||||
|
||||
|
@ -2747,7 +2747,7 @@ void CBattleInterface::obstaclePlaced(const CObstacleInstance & oi)
|
||||
//so when multiple obstacles are added, they show up one after another
|
||||
waitForAnims();
|
||||
|
||||
soundBase::soundID sound; // FIXME(v.markovtsev): soundh->playSound() is commented in the end => warning
|
||||
//soundBase::soundID sound; // FIXME(v.markovtsev): soundh->playSound() is commented in the end => warning
|
||||
|
||||
std::string defname;
|
||||
|
||||
|
@ -597,10 +597,9 @@ bool CRmgTemplateZone::createRoad(const int3& src, const int3& dst)
|
||||
if (distance < bestDistanceSoFar)
|
||||
{
|
||||
auto tile = &gen->map->getTile(pos);
|
||||
auto obj = tile->topVisitableObj();
|
||||
bool canMoveBetween = gen->map->canMoveBetween(currentNode, pos);
|
||||
|
||||
if (gen->isFree(pos) && gen->isFree(currentNode) //empty path
|
||||
if ((gen->isFree(pos) && gen->isFree(currentNode)) //empty path
|
||||
|| ((tile->visitable || currentTile->visitable) && canMoveBetween) //moving from or to visitable object
|
||||
|| pos == dst) //we already compledted the path
|
||||
{
|
||||
|
@ -580,7 +580,6 @@ void CVCMIServer::setPlayer(PlayerColor clickedColor)
|
||||
|
||||
|
||||
PlayerSettings & clicked = si->playerInfos[clickedColor];
|
||||
PlayerSettings * old = nullptr;
|
||||
|
||||
//identify clicked player
|
||||
int clickedNameID = 0; //number of player - zero means AI, assume it initially
|
||||
@ -628,7 +627,6 @@ void CVCMIServer::setPlayer(PlayerColor clickedColor)
|
||||
playerToRestore.color = i->first;
|
||||
playerToRestore.id = newPlayer;
|
||||
setPlayerConnectedId(i->second, PlayerSettings::PLAYER_AI); //set computer
|
||||
old = &i->second;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user