Mercurial > fife-parpg
diff engine/core/pathfinder/routepather/routepathersearch.cpp @ 292:6362c6812580
combine routepathersearch and search class to clean up the code.
author | wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 26 Jun 2009 18:04:57 +0000 |
parents | 90005975cdbb |
children | 66df2422a8b0 |
line wrap: on
line diff
--- a/engine/core/pathfinder/routepather/routepathersearch.cpp Wed Jun 24 14:12:50 2009 +0000 +++ b/engine/core/pathfinder/routepather/routepathersearch.cpp Fri Jun 26 18:04:57 2009 +0000 @@ -40,7 +40,7 @@ namespace FIFE { RoutePatherSearch::RoutePatherSearch(const int session_id, const Location& from, const Location& to, SearchSpace* searchSpace) - : Search(session_id, from, to, searchSpace), m_destCoordInt(0), m_startCoordInt(0), m_next(0) { + : m_destCoordInt(0), m_startCoordInt(0), m_next(0), m_to(to), m_from(from), m_sessionId(session_id), m_searchspace(searchSpace) { m_startCoordInt = m_searchspace->convertCoordToInt(from.getLayerCoordinates()); int max_index = m_searchspace->getMaxIndex(); m_destCoordInt = m_searchspace->convertCoordToInt(to.getLayerCoordinates()); @@ -49,6 +49,10 @@ m_sf.resize(max_index + 1, -1); m_gCosts.resize(max_index + 1, 0.0f); m_heuristic = Heuristic::getHeuristic(searchSpace->getLayer()->getCellGrid()->getType()); + // m_to = to; + // m_from = from; + // m_sessionId = session_id; + // m_searchspace = searchSpace; } void RoutePatherSearch::updateSearch() {