fixed problem where unhiding a gate closes it

This commit is contained in:
Tobias Ottenweller 2012-03-15 12:02:28 +01:00
parent 52a9278dfc
commit ae60da9e29

View File

@ -116,10 +116,14 @@ public class Gate
setGateBlocks(blocks);
if (blocks == null)
{
return false;
}
if (isHidden() == false)
{
fillGate(blocks);
}
setOpen(true);
@ -170,10 +174,12 @@ public class Gate
this.isHidden = isHidden;
if (isHidden == true)
removeGateBlocks();
else if (isOpen() && !open())
{
removeGateBlocks();
}
else if (this.isOpen && !open())
{
// cannot open that gate (no frame!)
this.isHidden = false;
return false;
}