From 5fb728d0be4ac0de91386e4291a38e5ce5e5442d Mon Sep 17 00:00:00 2001 From: Lynix Date: Sun, 8 Feb 2015 16:30:23 +0100 Subject: [PATCH] (World) Added DOC comments Former-commit-id: 211735ec2cf553b991f95b210af5e7e451ab4f1f --- SDK/src/NDK/World.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SDK/src/NDK/World.cpp b/SDK/src/NDK/World.cpp index 8f313a966..ae64967d3 100644 --- a/SDK/src/NDK/World.cpp +++ b/SDK/src/NDK/World.cpp @@ -65,6 +65,8 @@ namespace Ndk void World::KillEntity(Entity& entity) { + ///DOC: Ignoré si l'entité est invalide + if (IsEntityValid(entity)) m_killedEntities.push_back(entity); } @@ -89,11 +91,15 @@ namespace Ndk bool World::IsEntityValid(const Entity& entity) const { + ///DOC: Cette méthode vérifie également l'appartenance de l'entité au monde (et est donc plus sûre) return entity.GetWorld() == this && IsEntityIdValid(entity.GetId()); } bool World::IsEntityIdValid(Entity::Id id) const { + ///DOC: Il est possible que si l'identifiant vienne d'un autre monde, il soit considéré valide + /// alors qu'aucune entité de ce monde-ci ne l'utilise (encore) + return m_entitiesCounter[id.part.index] == id.part.counter; }