@@ -202,25 +202,16 @@ function AIUtil.getTractorRadiusFromImplementRadius(r, towBarLength)
202202 return rTractor
203203end
204204
205- function AIUtil .getArticulatedAxisVehicleReverserNode (vehicle )
206- local reverserNode , debugText
207- -- articulated axis vehicles have a special reverser node
208- -- and yes, Giants has a typo in there...
209- if vehicle .spec_articulatedAxis .aiRevereserNode ~= nil then
210- reverserNode = vehicle .spec_articulatedAxis .aiRevereserNode
211- debugText = ' vehicle articulated axis reverese'
212- elseif vehicle .spec_articulatedAxis .aiReverserNode ~= nil then
213- reverserNode = vehicle .spec_articulatedAxis .aiReverserNode
214- debugText = ' vehicle articulated axis reverse'
215- end
216- return reverserNode , debugText
217- end
218-
219205-- Find the node to use by the PPC when driving in reverse
220206function AIUtil .getReverserNode (vehicle , reversingImplement , suppressLog )
221207 local reverserNode , debugText
222208 -- if there's a reverser node on the tool, use that
223- reverserNode , debugText = AIVehicleUtil .getAIToolReverserDirectionNode (vehicle ), ' AIToolReverserDirectionNode'
209+ reverserNode , debugText = AIVehicleUtil .getAIToolReverserDirectionNode (vehicle ), ' AIVehicleUtil.AIToolReverserDirectionNode()'
210+ if not reverserNode then
211+ -- the vehicle may also have a tool reverser node, likely for the Nexat, this is the order Giants checks it
212+ -- in their driver.
213+ reverserNode , debugText = vehicle :getAIToolReverserDirectionNode (), ' vehicle:AIToolReverserDirectionNode()'
214+ end
224215 if not reverserNode then
225216 reversingImplement = reversingImplement and reversingImplement or AIUtil .getFirstReversingImplementWithWheels (vehicle , suppressLog )
226217 if reversingImplement and reversingImplement .steeringAxleNode then
@@ -230,9 +221,6 @@ function AIUtil.getReverserNode(vehicle, reversingImplement, suppressLog)
230221 if not reverserNode and vehicle .getAIReverserNode then
231222 reverserNode , debugText = vehicle :getAIReverserNode (), ' AIReverserNode'
232223 end
233- if not reverserNode and vehicle .spec_articulatedAxis ~= nil then
234- reverserNode , debugText = AIUtil .getArticulatedAxisVehicleReverserNode (vehicle )
235- end
236224 return reverserNode , debugText
237225end
238226
764752--- FS22_UniversalAutoload from Loki79uk: https://github.com/loki79uk/FS22_UniversalAutoload
765753function AIUtil .hasValidUniversalTrailerAttached (vehicle )
766754 local implements , found = AIUtil .getAllChildVehiclesWithSpecialization (vehicle , nil , " spec_universalAutoload" )
767- if not found then
755+ if not found then
768756 return false
769757 end
770758 local spec = implements [1 ].spec_universalAutoload
0 commit comments