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

fix typos

This commit is contained in:
Andrey Filipenkov 2023-03-12 19:04:04 +03:00
parent 68f5c1de79
commit 8f843d0bff
3 changed files with 6 additions and 6 deletions

View File

@ -331,7 +331,7 @@ TerrainId CCreature::getNativeTerrain() const
static const auto selectorNoTerrainPenalty = Selector::type()(Bonus::NO_TERRAIN_PENALTY);
//this code is used in the CreatureTerrainLimiter::limit to setup battle bonuses
//and in the CGHeroInstance::getNativeTerrain() to setup mevement bonuses or/and penalties.
//and in the CGHeroInstance::getNativeTerrain() to setup movement bonuses or/and penalties.
return hasBonus(selectorNoTerrainPenalty, selectorNoTerrainPenalty)
? TerrainId(ETerrainId::ANY_TERRAIN)
: (*VLC->townh)[faction]->nativeTerrain;

View File

@ -117,7 +117,7 @@ std::vector<CGPathNode *> NodeStorage::calculateTeleportations(
std::vector<int3> CPathfinderHelper::getNeighbourTiles(const PathNodeInfo & source) const
{
std::vector<int3> neighbourTiles;
neighbourTiles.reserve(16);
neighbourTiles.reserve(8);
getNeighbours(
*source.tile,
@ -721,7 +721,7 @@ PathfinderBlockingRule::BlockingReason MovementAfterDestinationRule::getBlocking
switch(destination.action)
{
/// TODO: Investigate what kind of limitation is possible to apply on movement from visitable tiles
/// Likely in many cases we don't need to add visitable tile to queue when hero don't fly
/// Likely in many cases we don't need to add visitable tile to queue when hero doesn't fly
case CGPathNode::VISIT:
{
/// For now we only add visitable tile into queue when it's teleporter that allow transit
@ -730,7 +730,7 @@ PathfinderBlockingRule::BlockingReason MovementAfterDestinationRule::getBlocking
if(pathfinderHelper->isAllowedTeleportEntrance(objTeleport))
{
/// For now we'll always allow transit over teleporters
/// Transit over whirlpools only allowed when hero protected
/// Transit over whirlpools only allowed when hero is protected
return BlockingReason::NONE;
}
else if(destination.nodeObject->ID == Obj::GARRISON
@ -1258,7 +1258,7 @@ int CPathfinderHelper::getMovementCost(
std::vector<int3> vec;
vec.reserve(8); //optimization
getNeighbours(*dt, dst, vec, ct->terType->isLand(), true);
for(auto & elem : vec)
for(const auto & elem : vec)
{
int fcost = getMovementCost(dst, elem, nullptr, nullptr, left, false);
if(fcost <= left)

View File

@ -65,7 +65,7 @@ struct DLL_LINKAGE CGPathNode
VISITABLE, //tile can be entered as the last tile in path
BLOCKVIS, //visitable from neighboring tile but not passable
FLYABLE, //can only be accessed in air layer
BLOCKED //tile can't be entered nor visited
BLOCKED //tile can be neither entered nor visited
};
CGPathNode * theNodeBefore;