Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // If you have holes, you can do this
- struct entity_ref
- {
- u32 index;
- u32 generation;
- };
- bool is_entity_valid(entity_ref ref)
- {
- if(entities[ref.index].generation == ref.generation)
- {
- return true;
- }
- return false;
- }
- // If you don't, you have to loop over all of them and check id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement