From e317642ddaf44e6f77d2905e2f35d22d3b1b4eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BC=D0=B0?= Date: Fri, 30 Aug 2024 02:44:09 +0400 Subject: [PATCH] s --- .../LocomotiveDockingService.cs | 2 +- .../ProjectLocomotive/Drawnings/DrawningTLocomotive.cs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ProjectLocomotive/ProjectLocomotive/CollectionGenericObjects/LocomotiveDockingService.cs b/ProjectLocomotive/ProjectLocomotive/CollectionGenericObjects/LocomotiveDockingService.cs index ede68a8..3ff3995 100644 --- a/ProjectLocomotive/ProjectLocomotive/CollectionGenericObjects/LocomotiveDockingService.cs +++ b/ProjectLocomotive/ProjectLocomotive/CollectionGenericObjects/LocomotiveDockingService.cs @@ -52,7 +52,7 @@ namespace ProjectLocomotive.CollectionGenericObjects catch (PositionOutOfCollectionException e) { } - if (curWidth > width - 2) + if (curWidth > width - 3) curWidth--; else { diff --git a/ProjectLocomotive/ProjectLocomotive/Drawnings/DrawningTLocomotive.cs b/ProjectLocomotive/ProjectLocomotive/Drawnings/DrawningTLocomotive.cs index 0b175be..dbf2adb 100644 --- a/ProjectLocomotive/ProjectLocomotive/Drawnings/DrawningTLocomotive.cs +++ b/ProjectLocomotive/ProjectLocomotive/Drawnings/DrawningTLocomotive.cs @@ -55,10 +55,12 @@ namespace ProjectLocomotive.Drawnings - - Point[] points4 = { new Point(_startPosX.Value + 20, _startPosY.Value), new Point(_startPosX.Value + 30, _startPosY.Value), new Point(_startPosX.Value + 30, _startPosY.Value - 7), new Point(_startPosX.Value + 32, _startPosY.Value - 9), new Point(_startPosX.Value + 30, _startPosY.Value - 11), new Point(_startPosX.Value + 20, _startPosY.Value - 11), new Point(_startPosX.Value + 18, _startPosY.Value - 9), new Point(_startPosX.Value + 20, _startPosY.Value - 7), new Point(_startPosX.Value + 20, _startPosY.Value) }; - g.FillPolygon(wheelBrush, points4); - + + if (entityTLocomotive.Pipe) + { + Point[] points4 = { new Point(_startPosX.Value + 20, _startPosY.Value), new Point(_startPosX.Value + 30, _startPosY.Value), new Point(_startPosX.Value + 30, _startPosY.Value - 7), new Point(_startPosX.Value + 32, _startPosY.Value - 9), new Point(_startPosX.Value + 30, _startPosY.Value - 11), new Point(_startPosX.Value + 20, _startPosY.Value - 11), new Point(_startPosX.Value + 18, _startPosY.Value - 9), new Point(_startPosX.Value + 20, _startPosY.Value - 7), new Point(_startPosX.Value + 20, _startPosY.Value) }; + g.FillPolygon(wheelBrush, points4); + } if (entityTLocomotive.Fueltank) {