From cc8e098183ff8f33f55625d26d7d643b5494b201 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sat, 15 May 2021 12:53:54 +0200 Subject: [PATCH] Fix duplicated Debug Draw inoke for actors --- Source/Engine/Level/Actor.cpp | 6 ------ Source/Engine/Level/Actor.h | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/Engine/Level/Actor.cpp b/Source/Engine/Level/Actor.cpp index 33d107579..20ec4cb7a 100644 --- a/Source/Engine/Level/Actor.cpp +++ b/Source/Engine/Level/Actor.cpp @@ -1248,12 +1248,6 @@ void Actor::OnDebugDraw() for (auto* script : Scripts) if (script->GetEnabled()) script->OnDebugDraw(); - - for (auto& child : Children) - { - if (child->GetIsActive()) - child->OnDebugDraw(); - } } void Actor::OnDebugDrawSelected() diff --git a/Source/Engine/Level/Actor.h b/Source/Engine/Level/Actor.h index 9f46bfa5e..00aeb17ab 100644 --- a/Source/Engine/Level/Actor.h +++ b/Source/Engine/Level/Actor.h @@ -665,12 +665,12 @@ public: #if USE_EDITOR /// - /// Draws debug shapes for the actor and all child actors. + /// Draws debug shapes for the actor and all child scripts. /// virtual void OnDebugDraw(); /// - /// Draws debug shapes for the selected actor and all child actors. + /// Draws debug shapes for the selected actor and all child scripts. /// virtual void OnDebugDrawSelected();