mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 19:56:38 +00:00 
			
		
		
		
	A* misses 1st closest node fix
This commit is contained in:
		
							parent
							
								
									f596b698d9
								
							
						
					
					
						commit
						01810f24b0
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -328,6 +328,12 @@ namespace MWMechanics | |||
|             path.push_front(pt); | ||||
|             current = graphParent[current]; | ||||
|         } | ||||
| 
 | ||||
|         // add first node to path explicitly
 | ||||
|         ESM::Pathgrid::Point pt = mPathgrid->mPoints[start]; | ||||
|         pt.mX += xCell; | ||||
|         pt.mY += yCell; | ||||
|         path.push_front(pt); | ||||
|         return path; | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue