mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Some partial success on getting fly to work similarly to SoD
This commit is contained in:
parent
f6e0f46040
commit
440b468e27
@ -29,7 +29,7 @@ PathfinderOptions::PathfinderOptions()
|
||||
, useCastleGate(false)
|
||||
, lightweightFlyingMode(false)
|
||||
, oneTurnSpecialLayersLimit(true)
|
||||
, originalMovementRules(false)
|
||||
, originalMovementRules(true)
|
||||
, turnLimit(std::numeric_limits<uint8_t>::max())
|
||||
, canUseCast(false)
|
||||
{
|
||||
|
@ -384,12 +384,23 @@ void LayerTransitionRule::process(
|
||||
case EPathfindingLayer::AIR:
|
||||
if(pathfinderConfig->options.originalMovementRules)
|
||||
{
|
||||
if((source.node->accessible != EPathAccessibility::ACCESSIBLE &&
|
||||
source.node->accessible != EPathAccessibility::VISITABLE) &&
|
||||
(destination.node->accessible != EPathAccessibility::VISITABLE &&
|
||||
destination.node->accessible != EPathAccessibility::ACCESSIBLE))
|
||||
if(destination.coord.x == 2 && destination.coord.y == 35)
|
||||
logGlobal->error(source.node->coord.toString() + std::string(" Layer: ") + std::to_string(destination.node->layer) + std::string(" Accessibility: ") + std::to_string((int)source.node->accessible));
|
||||
|
||||
if(source.node->accessible != EPathAccessibility::ACCESSIBLE &&
|
||||
source.node->accessible != EPathAccessibility::VISITABLE &&
|
||||
destination.node->accessible != EPathAccessibility::VISITABLE &&
|
||||
destination.node->accessible != EPathAccessibility::ACCESSIBLE)
|
||||
{
|
||||
destination.blocked = true;
|
||||
if(destination.node->accessible == EPathAccessibility::BLOCKVIS)
|
||||
{
|
||||
if(source.nodeObject || source.tile->blocked)
|
||||
{
|
||||
destination.blocked = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
destination.blocked = true;
|
||||
}
|
||||
}
|
||||
else if(destination.node->accessible != EPathAccessibility::ACCESSIBLE)
|
||||
|
Loading…
Reference in New Issue
Block a user