Skip to content

Commit

Permalink
Fix section transition behavior being applied to any Y level below (0…
Browse files Browse the repository at this point in the history
… + overlap). (#73)
  • Loading branch information
Norazan authored Aug 6, 2021
1 parent 3208c2c commit beb24dd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ val Location.inSectionOverlap: Boolean
fun Location.sharedBetween(section: Section, otherSection: Section): Boolean {
val overlap = section.overlapWith(otherSection) ?: return false
return when {
section.isOnTopOf(otherSection) -> blockY <= overlap
section.isOnTopOf(otherSection) -> blockY <= world.minHeight + overlap
otherSection.isOnTopOf(section) -> blockY >= world.maxHeight - overlap
else -> false
}
Expand Down

0 comments on commit beb24dd

Please sign in to comment.