Skip to content

Commit

Permalink
Merge pull request #1105 from CitiesSkylinesMods/stable-11.5.2-cargoT…
Browse files Browse the repository at this point in the history
…ruckAI-fix

Stable 11.5.2 cargo truck PF fix
  • Loading branch information
krzychu124 committed May 12, 2021
2 parents 835eddc + 5d5eb9d commit 1b4c437
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions TLM/TLM/Custom/AI/CustomCargoTruckAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public class CustomCargoTruckAI : CarAI {
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;
Expand Down
5 changes: 3 additions & 2 deletions TLM/TLM/Custom/PathFinding/CustomPathFind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathManager>.instance.m_pathUnitCount =
Expand Down Expand Up @@ -1629,7 +1629,8 @@ ref netManager.m_segments.m_buffer
}

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(
Expand Down
4 changes: 2 additions & 2 deletions TLM/TLM/TrafficManagerMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1b4c437

Please sign in to comment.