Skip to content
This repository has been archived by the owner on Mar 3, 2019. It is now read-only.

Commit

Permalink
Bugfix désactivation obstacles
Browse files Browse the repository at this point in the history
  • Loading branch information
PFGimenez committed May 23, 2017
1 parent c7d0d1a commit e8a9976
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pc/src/pathfinding/astar/arcs/ArcManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -384,18 +384,24 @@ public void disableObstaclesFixes(boolean symetrie, CinematiqueObs obs)
{
disabledObstaclesFixes.clear();
ObstaclesFixes depart;
boolean vide = true;
if(symetrie)
depart = ObstaclesFixes.ZONE_DEPART_GAUCHE_CENTRE;
else
depart = ObstaclesFixes.ZONE_DEPART_DROITE_CENTRE;
disabledObstaclesFixes.add(depart);

for(ObstaclesFixes o : ObstaclesFixes.values())
if(!o.bordure && o.getObstacle().isColliding(obs.obstacle))
{
vide = false;
log.warning("Désactivation de l'obstacle fixe : " + o + ". Obs : " + obs);
disabledObstaclesFixes.add(o);
}
if(!disabledObstaclesFixes.isEmpty())

if(!disabledObstaclesFixes.contains(depart))
disabledObstaclesFixes.add(depart);

if(!vide)
dstarlite.disableObstaclesFixes(obs.getPosition(), depart.getObstacle());
else
dstarlite.disableObstaclesFixes(null, depart.getObstacle());
Expand Down

0 comments on commit e8a9976

Please sign in to comment.