(World) Fixed EntityHandle passed by value
Former-commit-id: c4b4b5cbb4d84110416a4493fc09e7b95e137bc6
This commit is contained in:
@@ -30,12 +30,12 @@ namespace Ndk
|
||||
|
||||
void Clear();
|
||||
|
||||
void KillEntity(EntityHandle entity);
|
||||
void KillEntity(const EntityHandle& entity);
|
||||
void KillEntities(const EntityList& list);
|
||||
|
||||
EntityHandle GetEntity(Entity::Id id);
|
||||
|
||||
bool IsEntityValid(EntityHandle entity) const;
|
||||
bool IsEntityValid(const EntityHandle& entity) const;
|
||||
bool IsEntityIdValid(Entity::Id id) const;
|
||||
|
||||
void Update();
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Ndk
|
||||
KillEntity(entity);
|
||||
}
|
||||
|
||||
inline bool World::IsEntityValid(EntityHandle entity) const
|
||||
inline bool World::IsEntityValid(const EntityHandle& entity) const
|
||||
{
|
||||
return entity.IsValid() && entity->GetWorld() == this && IsEntityIdValid(entity->GetId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user