fixed #20
This commit is contained in:
@@ -655,13 +655,24 @@ public:
|
||||
*/
|
||||
void reset() {
|
||||
available.clear();
|
||||
pools.clear();
|
||||
|
||||
for(auto &&entity: entities) {
|
||||
const auto version = 1 + ((entity >> traits_type::entity_shift) & traits_type::version_mask);
|
||||
entity = (entity & traits_type::entity_mask) | (version << traits_type::entity_shift);
|
||||
available.push_back(entity);
|
||||
}
|
||||
|
||||
for(auto &&handler: handlers) {
|
||||
if(handler) {
|
||||
handler->reset();
|
||||
}
|
||||
}
|
||||
|
||||
for(auto &&pool: pools) {
|
||||
if(pool) {
|
||||
pool->reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user