Skip to content

Commit 106c837

Browse files
authored
Merge pull request #60 from SomeoneSom/patch-1
Fix Falling Mini Heart Doors
2 parents 4ea380e + 60ccb89 commit 106c837

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Entities/MiniHeartDoor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,13 @@ public override void Update() {
205205
base.Update();
206206

207207
// make sure the two blocks don't escape their boundaries when the door opens up.
208-
if (TopSolid.Top != Y - height) {
208+
if (TopSolid.Top != Y - height && Opened) {
209209
// if the top block is at 12 instead of 16, and has height 30, make it height 26 instead.
210210
float displacement = (Y - height) - TopSolid.Top; // 20 - 16 = 4
211211
TopSolid.Collider.Height = height - displacement; // 30 - 4 = 26
212212
TopSolid.Top = Y - height; // replace the block at 16
213213
}
214-
if (BottomSolid.Bottom != Y + height) {
214+
if (BottomSolid.Bottom != Y + height && Opened) {
215215
float displacement = BottomSolid.Top - Y;
216216
BottomSolid.Collider.Height = height - displacement;
217217
}

0 commit comments

Comments
 (0)