mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-12-01 15:35:47 +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:
parent
36ea0fb8fb
commit
fc76b2de12
1 changed files with 4 additions and 2 deletions
|
@ -376,7 +376,7 @@ bool RenderObject::hasRenderPass(const int pass) const
|
||||||
|
|
||||||
bool RenderObject::shouldTryToRender() const
|
bool RenderObject::shouldTryToRender() const
|
||||||
{
|
{
|
||||||
return !parent
|
return !parent && !_hidden
|
||||||
&& alpha.x > 0
|
&& alpha.x > 0
|
||||||
&& (!cull || isOnScreen());
|
&& (!cull || isOnScreen());
|
||||||
}
|
}
|
||||||
|
@ -392,7 +392,9 @@ bool RenderObject::isVisibleInPass(int pass) const
|
||||||
void RenderObject::render(const RenderState& rs) const
|
void RenderObject::render(const RenderState& rs) const
|
||||||
{
|
{
|
||||||
assert(parent || layer != LR_NONE);
|
assert(parent || layer != LR_NONE);
|
||||||
if (isHidden()) return;
|
|
||||||
|
if(_hidden)
|
||||||
|
return;
|
||||||
|
|
||||||
/// new (breaks anything?)
|
/// new (breaks anything?)
|
||||||
if (alpha.x == 0 || alphaMod == 0) return;
|
if (alpha.x == 0 || alphaMod == 0) return;
|
||||||
|
|
Loading…
Reference in a new issue