From ada62614a049230081d1551a71eff62b5f88dc02 Mon Sep 17 00:00:00 2001 From: Jose Luis Rey Mendez Date: Tue, 21 Jul 2020 08:52:40 -0300 Subject: [PATCH] Fix TypeSafeDictionary.AddEntityToDictionary was using the entityID from the original group instead the target entityID --- Svelto.ECS/DataStructures/TypeSafeDictionary.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Svelto.ECS/DataStructures/TypeSafeDictionary.cs b/Svelto.ECS/DataStructures/TypeSafeDictionary.cs index 73a9229..089fde8 100644 --- a/Svelto.ECS/DataStructures/TypeSafeDictionary.cs +++ b/Svelto.ECS/DataStructures/TypeSafeDictionary.cs @@ -128,7 +128,7 @@ namespace Svelto.ECS.Internal if (_hasEgid) SetEGIDWithoutBoxing.SetIDWithoutBoxing(ref entity, toEntityID); - toGroupCasted.Add(fromEntityGid.entityID, entity); + toGroupCasted.Add(toEntityID.entityID, entity); } } else @@ -144,7 +144,7 @@ namespace Svelto.ECS.Internal if (_hasEgid) SetEGIDWithoutBoxing.SetIDWithoutBoxing(ref entity, toEntityID); - toGroupCasted.Add(fromEntityGid.entityID, entity); + toGroupCasted.Add(toEntityID.entityID, entity); } } }