ushort IAStarTarget.GetCostBetween(IntVector3 src, IntVector3 dst) { ushort cost = (src - dst).ManhattanLength == 1 ? (ushort)COST_STRAIGHT : (ushort)COST_DIAGONAL; cost += (ushort)m_env.GetWeight(dst); return(cost); }