From a4c2b65eb9197ff8e2b8c90ed9fc366dfae68259 Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Sun, 4 Jun 2023 18:58:26 +0800 Subject: [PATCH] fix conflict of constraints --- src/EcsSubject.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/EcsSubject.cs b/src/EcsSubject.cs index 57829d1..6a7d91b 100644 --- a/src/EcsSubject.cs +++ b/src/EcsSubject.cs @@ -104,6 +104,9 @@ namespace DCFApixels.DragonECS public TOtherSubject Combine() where TOtherSubject : EcsSubject { var result = _world.GetSubject(); + _inc.ExceptWith(result.mask._exc);//удаляю конфликтующие ограничения + _exc.ExceptWith(result.mask._inc);//удаляю конфликтующие ограничения + _inc.UnionWith(result.mask._inc); _exc.UnionWith(result.mask._exc); return result;