-removed unused CallData.deltas member
This commit is contained in:
parent
e4573f1ec7
commit
288ad4c6cd
1 changed files with 3 additions and 35 deletions
|
|
@ -618,10 +618,7 @@ class EntityManager
|
|||
export void addEntityCaller(ref EntityInfo entity, uint system_id)
|
||||
{
|
||||
System* system = &systems[system_id];
|
||||
CallData call_data = CallData(system_id, system, &entity, null);
|
||||
uint num = cast(uint)(system.m_components.length + system.m_optional_components.length);
|
||||
ushort[] deltas = (cast(ushort*) alloca(num * ushort.sizeof))[0 .. num];
|
||||
uint delta_id = 0;
|
||||
CallData call_data = CallData(system_id, system, &entity);
|
||||
|
||||
if(system.m_absen_components)
|
||||
{
|
||||
|
|
@ -636,41 +633,14 @@ class EntityManager
|
|||
|
||||
foreach (id; system.m_components)
|
||||
{
|
||||
deltas[delta_id] = ushort.max;
|
||||
foreach (i2, id2; entity.components)
|
||||
{
|
||||
if (id2 == id)
|
||||
{
|
||||
deltas[delta_id] = entity.deltas[id2];
|
||||
break;
|
||||
}
|
||||
if (id2 == id)goto is_;
|
||||
}
|
||||
if (deltas[delta_id] == ushort.max)
|
||||
{
|
||||
deltas = null;
|
||||
break;
|
||||
}
|
||||
delta_id++;
|
||||
}
|
||||
if (deltas is null)
|
||||
return;
|
||||
|
||||
foreach (id; system.m_optional_components)
|
||||
{
|
||||
deltas[delta_id] = ushort.max;
|
||||
foreach (i2, id2; entity.components)
|
||||
{
|
||||
if (id2 == id)
|
||||
{
|
||||
deltas[delta_id] = entity.deltas[id2];
|
||||
break;
|
||||
}
|
||||
}
|
||||
delta_id++;
|
||||
is_:
|
||||
}
|
||||
|
||||
call_data.deltas = Mallocator.instance.makeArray(deltas); //Mallocator.instance.makeArray!ushort(system.m_components.length);
|
||||
|
||||
uint index = 0;
|
||||
for (; index < entity.callers.length; index++)
|
||||
{
|
||||
|
|
@ -1272,8 +1242,6 @@ class EntityManager
|
|||
System* system;
|
||||
///poiner to Entity type info
|
||||
EntityManager.EntityInfo* info;
|
||||
///deltas for components
|
||||
ushort[] deltas; //unused in linear-layout
|
||||
}
|
||||
|
||||
alias SytemFuncType = void function(ref EntityManager.CallData data, void* entity);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue