equal
deleted
inserted
replaced
44 bool bDest = IsTileDepotType(tile, TRANSPORT_RAIL); |
44 bool bDest = IsTileDepotType(tile, TRANSPORT_RAIL); |
45 return bDest; |
45 return bDest; |
46 } |
46 } |
47 |
47 |
48 /** Called by YAPF to calculate cost estimate. Calculates distance to the destination |
48 /** Called by YAPF to calculate cost estimate. Calculates distance to the destination |
49 * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */ |
49 * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */ |
50 FORCEINLINE bool PfCalcEstimate(Node& n) |
50 FORCEINLINE bool PfCalcEstimate(Node& n) |
51 { |
51 { |
52 n.m_estimate = n.m_cost; |
52 n.m_estimate = n.m_cost; |
53 return true; |
53 return true; |
54 } |
54 } |
116 } |
116 } |
117 return bDest; |
117 return bDest; |
118 } |
118 } |
119 |
119 |
120 /** Called by YAPF to calculate cost estimate. Calculates distance to the destination |
120 /** Called by YAPF to calculate cost estimate. Calculates distance to the destination |
121 * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */ |
121 * adds it to the actual cost from origin and stores the sum to the Node::m_estimate */ |
122 FORCEINLINE bool PfCalcEstimate(Node& n) |
122 FORCEINLINE bool PfCalcEstimate(Node& n) |
123 { |
123 { |
124 static int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; |
124 static int dg_dir_to_x_offs[] = {-1, 0, 1, 0}; |
125 static int dg_dir_to_y_offs[] = {0, 1, 0, -1}; |
125 static int dg_dir_to_y_offs[] = {0, 1, 0, -1}; |
126 if (PfDetectDestination(n)) { |
126 if (PfDetectDestination(n)) { |