From 7725cf692a16073f1d374dda4824dca5ef31dfdc Mon Sep 17 00:00:00 2001 From: marusya Date: Sun, 5 Nov 2023 21:26:44 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SelfPropelledArtilleryUnit/DrawningUsta.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/DrawningUsta.cs b/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/DrawningUsta.cs index ee9ed89..8f5ecf9 100644 --- a/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/DrawningUsta.cs +++ b/SelfPropelledArtilleryUnit/SelfPropelledArtilleryUnit/DrawningUsta.cs @@ -95,7 +95,7 @@ namespace SelfPropelledArtilleryUnit.DrawningObjects public void SetPosition(int x, int y) { // TODO: Изменение x, y, если при установке объект выходит за границы - if (x < 0 || y < 0) + if (x < 0 || y < 0 || x + _ustaWidth > _pictureWidth || y + _ustaHeight > _pictureHeight) { x = 10; y = 10;