mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Moved assertions before variable is used
This commit is contained in:
parent
4bb5784922
commit
c4fc8f08c0
@ -3299,13 +3299,13 @@ void CPathfinder::initializeGraph()
|
||||
|
||||
void CPathfinder::calculatePaths()
|
||||
{
|
||||
int3 src = hero->getPosition(false);
|
||||
assert(hero);
|
||||
assert(hero == getHero(hero->id));
|
||||
|
||||
bool flying = hero->hasBonusOfType(Bonus::FLYING_MOVEMENT);
|
||||
int maxMovePointsLand = hero->maxMovePoints(true);
|
||||
int maxMovePointsWater = hero->maxMovePoints(false);
|
||||
int3 src = hero->getPosition(false);
|
||||
|
||||
auto maxMovePoints = [&](CGPathNode *cp) -> int
|
||||
{
|
||||
@ -3323,7 +3323,6 @@ void CPathfinder::calculatePaths()
|
||||
|
||||
initializeGraph();
|
||||
|
||||
|
||||
//initial tile - set cost on 0 and add to the queue
|
||||
CGPathNode &initialNode = *getNode(out.hpos);
|
||||
initialNode.turns = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user