}
std::get<bool>(entities[currentSize]) = true;
- std::get<BitsetType>(entities[currentSize]).reset();
return currentSize++;
}
deletedSet.erase(iter);
}
std::get<bool>(entities[id]) = true;
- std::get<BitsetType>(entities[id]).reset();
return id;
}
}
if(hasEntity(index))
{
std::get<bool>(entities.at(index)) = false;
+ std::get<BitsetType>(entities.at(index)).reset();
deletedSet.insert(index);
}
}
{
for(auto eid : matching)
{
- helper.callInstancePtr(eid, *this, &function);
+ if(isAlive(eid))
+ {
+ helper.callInstancePtr(eid, *this, &function);
+ }
}
}
else
std::size_t end) {
for(std::size_t i = begin; i < end; ++i)
{
- helper.callInstancePtr(i, *this, &function);
+ if(isAlive(i))
+ {
+ helper.callInstancePtr(i, *this, &function);
+ }
}
},
begin, end);
{
for(const auto& id : multiMatchingEntities[index])
{
- Helper::call(id, *this, func);
+ if(isAlive(id))
+ {
+ Helper::call(id, *this, func);
+ }
}
}
else
for(std::size_t j = begin; j < end;
++j)
{
- Helper::call(
- multiMatchingEntities[index][j],
- *this,
- func);
+ if(isAlive(multiMatchingEntities[index][j]))
+ {
+ Helper::call(
+ multiMatchingEntities[index][j],
+ *this,
+ func);
+ }
}
}, begin, end);
}
{
for(const auto& id : multiMatchingEntities[index])
{
- Helper::callPtr(id, *this, func);
+ if(isAlive(id))
+ {
+ Helper::callPtr(id, *this, func);
+ }
}
}
else
for(std::size_t j = begin; j < end;
++j)
{
- Helper::callPtr(
- multiMatchingEntities[index][j],
- *this,
- func);
+ if(isAlive(multiMatchingEntities[index][j]))
+ {
+ Helper::callPtr(
+ multiMatchingEntities[index][j],
+ *this,
+ func);
+ }
}
}, begin, end);
}