fix component remove also removing priority
parent
e5c1d7e4c4
commit
52d4adf880
|
@ -78,8 +78,8 @@ namespace Encompass
|
|||
{
|
||||
if (!_priorities.ContainsKey(entityID) || priority <= _priorities[entityID]) // if priorities are equal that means it's the same engine
|
||||
{
|
||||
_priorities[entityID] = priority;
|
||||
ForceRemove(entityID);
|
||||
_priorities[entityID] = priority;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,6 @@ namespace Encompass
|
|||
{
|
||||
var storageIndex = _entityIDToStorageIndex[entityID];
|
||||
_entityIDToStorageIndex.Remove(entityID);
|
||||
_priorities.Remove(entityID);
|
||||
|
||||
// move a component into the hole to maintain contiguous memory
|
||||
if (_nextID > 1 && storageIndex != _nextID - 1)
|
||||
|
|
Loading…
Reference in New Issue