mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixed warnings
This commit is contained in:
parent
20acdbbf3b
commit
eef45b5ae8
@ -678,7 +678,7 @@ void CMapHandler::CMapWorldViewBlitter::drawOverlayEx(SDL_Surface * targetSurf)
|
||||
|
||||
for(const ObjectPosInfo & iconInfo : *(info->additionalIcons))
|
||||
{
|
||||
if(!iconInfo.pos.z == pos.z)
|
||||
if( iconInfo.pos.z != pos.z)
|
||||
continue;
|
||||
|
||||
if((iconInfo.pos.x < topTile.x) || (iconInfo.pos.y < topTile.y))
|
||||
|
@ -377,7 +377,7 @@ TPossibleGuards CBankInfo::getPossibleGuards() const
|
||||
for (const JsonNode & configEntry : config)
|
||||
{
|
||||
const JsonNode & guardsInfo = configEntry["guards"];
|
||||
auto stacks = JsonRandom::evaluateCreatures(configEntry["guards"]);
|
||||
auto stacks = JsonRandom::evaluateCreatures(guardsInfo);
|
||||
IObjectInfo::CArmyStructure army;
|
||||
|
||||
|
||||
|
@ -162,7 +162,7 @@ public:
|
||||
|
||||
TPossibleGuards getPossibleGuards() const;
|
||||
|
||||
//I have no idea what do these functions do or were supposed to do - War
|
||||
// These functions should try to evaluate minimal possible/max possible guards to give provide information on possible thread to AI
|
||||
CArmyStructure minGuards() const;
|
||||
CArmyStructure maxGuards() const;
|
||||
|
||||
|
@ -96,7 +96,7 @@ private:
|
||||
CTileInfo*** tiles;
|
||||
|
||||
int prisonsRemaining;
|
||||
int questArtsRemaining;
|
||||
//int questArtsRemaining;
|
||||
int monolithIndex;
|
||||
std::vector<ArtifactID> questArtifacts;
|
||||
|
||||
|
@ -430,7 +430,7 @@ void CRmgTemplateZone::fractalize(CMapGenerator* gen)
|
||||
//the more treasure density, the greater distance between paths. Scaling is experimental.
|
||||
int totalDensity = 0;
|
||||
for (auto ti : treasureInfo)
|
||||
totalDensity =+ ti.density;
|
||||
totalDensity += ti.density;
|
||||
const float minDistance = 10 * 10; //squared
|
||||
|
||||
for (auto tile : tileinfo)
|
||||
@ -2239,7 +2239,7 @@ void CRmgTemplateZone::addAllPossibleObjects(CMapGenerator* gen)
|
||||
auto generateArtInfo = [this](ArtifactID id) -> ObjectInfo
|
||||
{
|
||||
ObjectInfo artInfo;
|
||||
artInfo.probability = 1e6; //99,9% to spawn that art in first treasure pile
|
||||
artInfo.probability = std::numeric_limits<ui16>::max(); //99,9% to spawn that art in first treasure pile
|
||||
artInfo.maxPerZone = 1;
|
||||
artInfo.value = 2000; //treasure art
|
||||
artInfo.setTemplate(Obj::ARTIFACT, id, this->terrainType);
|
||||
|
Loading…
Reference in New Issue
Block a user