1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

CPathfinder: store pathfinding options in set instead of variables

There is plenty of variables now and in future I'm going to add more more once pathfinder become usable for all kind of things.
This commit is contained in:
ArseniyShestakov
2015-10-12 10:29:39 +03:00
parent 886042dc11
commit 0faedde6b9
2 changed files with 19 additions and 16 deletions

View File

@@ -279,11 +279,16 @@ struct DLL_EXPORT DuelParameters
class CPathfinder : private CGameInfoCallback
{
private:
bool allowEmbarkAndDisembark;
bool allowTeleportTwoWay; // Two-way monoliths and Subterranean Gate
bool allowTeleportOneWay; // One-way monoliths with one known exit only
bool allowTeleportOneWayRandom; // One-way monoliths with more than one known exit
bool allowTeleportWhirlpool; // Force enabled if hero protected or unaffected (have one stack of one creature)
enum class EOptions
{
EMBARK_AND_DISEMBARK,
TELEPORT_TWO_WAY, // Two-way monoliths and Subterranean Gate
TELEPORT_ONE_WAY, // One-way monoliths with one known exit only
TELEPORT_ONE_WAY_RANDOM, // One-way monoliths with more than one known exit
TELEPORT_WHIRLPOOL // Force enabled if hero protected or unaffected (have one stack of one creature)
};
std::set<EOptions> options;
CPathsInfo &out;
const CGHeroInstance *hero;
const std::vector<std::vector<std::vector<ui8> > > &FoW;