From 6c315e82c4c7f6e587290d44cd61af4a52561d3e Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Tue, 11 May 2021 04:02:46 +0200 Subject: [PATCH 1/3] fixed old bug - outside connection detection --- TLM/TLM/Custom/AI/CustomCargoTruckAI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TLM/TLM/Custom/AI/CustomCargoTruckAI.cs b/TLM/TLM/Custom/AI/CustomCargoTruckAI.cs index 9fc8c8457..73f0029d1 100644 --- a/TLM/TLM/Custom/AI/CustomCargoTruckAI.cs +++ b/TLM/TLM/Custom/AI/CustomCargoTruckAI.cs @@ -99,8 +99,8 @@ public bool CustomStartPathFind(ushort vehicleId, out _)) { if (!startPosFound || (startAltDistSqrA < startDistSqrA - && (Mathf.Abs(endPos.x) > 8000f - || Mathf.Abs(endPos.z) > 8000f))) + && (Mathf.Abs(startPos.x) > 8000f + || Mathf.Abs(startPos.z) > 8000f))) { startPosA = startAltPosA; startPosB = startAltPosB; From 85808b869c42b1a7eaabe7d721a79f84546944eb Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Tue, 11 May 2021 23:00:21 +0200 Subject: [PATCH 2/3] Bumped current game version --- TLM/TLM/TrafficManagerMod.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TLM/TLM/TrafficManagerMod.cs b/TLM/TLM/TrafficManagerMod.cs index 513e507dc..11e43ca0c 100644 --- a/TLM/TLM/TrafficManagerMod.cs +++ b/TLM/TLM/TrafficManagerMod.cs @@ -26,8 +26,8 @@ public class TrafficManagerMod : IUserMod { public const uint GAME_VERSION = 188868624U; public const uint GAME_VERSION_A = 1u; public const uint GAME_VERSION_B = 13u; - public const uint GAME_VERSION_C = 0u; - public const uint GAME_VERSION_BUILD = 8u; + public const uint GAME_VERSION_C = 1u; + public const uint GAME_VERSION_BUILD = 1u; // Use SharedAssemblyInfo.cs to modify TM:PE version // External mods (eg. CSUR Toolbox) reference the versioning for compatibility purposes From 5d5eb9d39d7ab0e8d7ad0a5838768f7dae995a9c Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Tue, 11 May 2021 23:02:38 +0200 Subject: [PATCH 3/3] Fixed issue with cargo trucks ignoring lane routing, corrected BufferItem.VehicleUsed cast --- TLM/TLM/Custom/PathFinding/CustomPathFind.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TLM/TLM/Custom/PathFinding/CustomPathFind.cs b/TLM/TLM/Custom/PathFinding/CustomPathFind.cs index 2b6c649f7..5a31a9753 100644 --- a/TLM/TLM/Custom/PathFinding/CustomPathFind.cs +++ b/TLM/TLM/Custom/PathFinding/CustomPathFind.cs @@ -889,7 +889,7 @@ ref netManager.m_segments.m_buffer PathUnits.m_buffer[currentPathUnitId].m_laneTypes = (byte)finalBufferItem.LanesUsed; PathUnits.m_buffer[currentPathUnitId].m_vehicleTypes = - (ushort)finalBufferItem.VehiclesUsed; + (uint)finalBufferItem.VehiclesUsed; #endif sumOfPositionCounts += currentItemPositionCount; Singleton.instance.m_pathUnitCount = @@ -1629,7 +1629,8 @@ and we are at the start segment */ } ushort nextSegmentId; - if ((vehicleTypes_ & VehicleInfo.VehicleType.Ferry) != VehicleInfo.VehicleType.None) { + if ((queueItem_.vehicleType & (ExtVehicleType.CargoVehicle | ExtVehicleType.Service)) == ExtVehicleType.None && + (vehicleTypes_ & VehicleInfo.VehicleType.Ferry) != VehicleInfo.VehicleType.None) { // ferry (/ monorail) if (isLogEnabled) { DebugLog(