File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,8 @@ class EPF_PersistentRootEntityCollection : EPF_MetaDataDbEntity
15
15
{
16
16
if (EPF_BitFlags .CheckFlags (persistenceComponent .GetFlags (), EPF_EPersistenceFlags .BAKED ))
17
17
{
18
- // TODO refactor to use https://feedback.bistudio.com/T172042 when patched
19
- int idx = m_aRemovedBackedRootEntities .Find (persistentId );
20
- if (idx != -1 )
21
- {
22
- m_aRemovedBackedRootEntities .Remove (idx );
18
+ if (m_aRemovedBackedRootEntities .RemoveItem (persistentId ))
23
19
return ;
24
- }
25
20
}
26
21
27
22
EPF_PersistenceComponentClass settings = EPF_ComponentData < EPF_PersistenceComponentClass > .Get (persistenceComponent );
@@ -37,11 +32,13 @@ class EPF_PersistentRootEntityCollection : EPF_MetaDataDbEntity
37
32
array < string > ids = m_mSelfSpawnDynamicEntities .Get (settings .m_tSaveDataType );
38
33
if (!ids )
39
34
{
40
- ids = {};
35
+ ids = {persistentId };
41
36
m_mSelfSpawnDynamicEntities .Set (settings .m_tSaveDataType , ids );
37
+ return ;
42
38
}
43
-
44
- ids .Insert (persistentId );
39
+
40
+ if (!ids .Contains (persistentId ))
41
+ ids .Insert (persistentId );
45
42
}
46
43
47
44
//------------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments