From fc76b2de125cca50c533460a85323bddbf0c0f8b Mon Sep 17 00:00:00 2001 From: fgenesis Date: Thu, 1 Jun 2023 20:19:37 +0200 Subject: [PATCH] fix hidden checks, oops Turns out any part of the hierarchy can be hidden, not just the parent. Esp. the game menu does this. --- BBGE/RenderObject.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BBGE/RenderObject.cpp b/BBGE/RenderObject.cpp index e1d42f4..cdf96af 100644 --- a/BBGE/RenderObject.cpp +++ b/BBGE/RenderObject.cpp @@ -376,7 +376,7 @@ bool RenderObject::hasRenderPass(const int pass) const bool RenderObject::shouldTryToRender() const { - return !parent + return !parent && !_hidden && alpha.x > 0 && (!cull || isOnScreen()); } @@ -392,7 +392,9 @@ bool RenderObject::isVisibleInPass(int pass) const void RenderObject::render(const RenderState& rs) const { assert(parent || layer != LR_NONE); - if (isHidden()) return; + + if(_hidden) + return; /// new (breaks anything?) if (alpha.x == 0 || alphaMod == 0) return;