fix not allowing same engine to write twice
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
150043b0e5
commit
e3d8f42bd9
|
@ -35,7 +35,7 @@ namespace Encompass
|
|||
|
||||
public bool Set(int entityID, in TComponent component, int priority)
|
||||
{
|
||||
if (!_priorities.ContainsKey(entityID) || priority < _priorities[entityID])
|
||||
if (!_priorities.ContainsKey(entityID) || priority <= _priorities[entityID]) // if priorities are equal that means it's the same engine
|
||||
{
|
||||
InternalSet(entityID, component);
|
||||
_priorities[entityID] = priority;
|
||||
|
@ -45,7 +45,7 @@ namespace Encompass
|
|||
return false;
|
||||
}
|
||||
|
||||
private unsafe void InternalSet(int entityID, in TComponent component)
|
||||
private void InternalSet(int entityID, in TComponent component)
|
||||
{
|
||||
if (!_indices.ContainsKey(entityID))
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ namespace Encompass
|
|||
|
||||
public override bool Remove(int entityID, int priority)
|
||||
{
|
||||
if (!_priorities.ContainsKey(entityID) || priority < _priorities[entityID])
|
||||
if (!_priorities.ContainsKey(entityID) || priority <= _priorities[entityID]) // if priorities are equal that means it's the same engine
|
||||
{
|
||||
_priorities[entityID] = priority;
|
||||
ForceRemove(entityID);
|
||||
|
|
Loading…
Reference in New Issue