home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 03 Pathfinding with Astar / 02 Higgins / Listing4.cpp < prev    next >
Encoding:
Text File  |  2001-12-09  |  744 b   |  19 lines

  1. /* Copyright (C) Dan Higgins, 2001. 
  2.  * All rights reserved worldwide.
  3.  *
  4.  * This software is provided "as is" without express or implied
  5.  * warranties. You may freely copy and compile this source into
  6.  * applications you distribute provided that the copyright text
  7.  * below is included in the resulting source code, for example:
  8.  * "Portions Copyright (C) Dan Higgins, 2001"
  9.  */
  10. long GetTileCost( U2Dpoint<long>& inFrom, U2Dpoint<long>& inTo )
  11. {
  12.     // Modifier goals keep us from having more pathfinder  
  13.     // classes when all we need is a 2 method modifier
  14.     if (this->mModifierGoal == NULL)
  15.         return this->InternalGetTileCost(inFrom,inTo);
  16.     else
  17.         return this->mModiferGoal->GetTileCost(inFrom,inTo);
  18. }
  19.