1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-28 19:23:53 +00:00

fix hidden checks, oops

Turns out any part of the hierarchy can be hidden, not just the parent.
Esp. the game menu does this.
This commit is contained in:
fgenesis 2023-06-01 20:19:37 +02:00
parent 36ea0fb8fb
commit fc76b2de12

View file

@ -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;