fix edge-case where sprites could be dragged out of bounds through connection

This commit is contained in:
2023-12-23 18:35:04 -07:00
parent 7413e94c32
commit 4dded1a1c2

View File

@@ -183,6 +183,16 @@ class KissExtendedSprite extends flixel.addons.display.FlxExtendedSprite {
var nextPos = startPos.copyTo().addPoint(spriteTotalMovement);
sprite.x = nextPos.x;
sprite.y = nextPos.y;
if (sprite.boundsRect != null)
{
sprite.checkBoundsRect();
}
if (sprite.boundsSprite != null)
{
sprite.checkBoundsSprite();
}
}
}