mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 01:54:04 +09:00
virtual down down working slightly better
This commit is contained in:
@@ -291,9 +291,10 @@ open class ActorHumanoid : ActorWithBody, Controllable, Pocketed, Factionable, L
|
|||||||
// platform-related hacks
|
// platform-related hacks
|
||||||
// allow latching down downDownVirtually only when standing on a platform AND not jumping upwards
|
// allow latching down downDownVirtually only when standing on a platform AND not jumping upwards
|
||||||
val occupyingTileHasPlatform = bodyTiles.filterNotNull().any { it.isPlatform }
|
val occupyingTileHasPlatform = bodyTiles.filterNotNull().any { it.isPlatform }
|
||||||
|
val feetTileHasPlatform = feetTiles.filterNotNull().any { it.isPlatform }
|
||||||
val feetTileIsAllPlatform = feetTiles.filterNotNull().all { it.isPlatform }
|
val feetTileIsAllPlatform = feetTiles.filterNotNull().all { it.isPlatform }
|
||||||
if (isDownDown && feetTileIsAllPlatform && (controllerV?.y ?: 0.0) >= 0.0 ||
|
if (isDownDown && feetTileIsAllPlatform && (controllerV?.y ?: 0.0) >= 0.0 ||
|
||||||
occupyingTileHasPlatform && !feetTileIsAllPlatform) { // FIXME this does not account for reverse gravity
|
occupyingTileHasPlatform && !feetTileHasPlatform) { // FIXME this does not account for reverse gravity
|
||||||
downDownVirtually = true
|
downDownVirtually = true
|
||||||
}
|
}
|
||||||
if (downDownVirtually && !occupyingTileHasPlatform && !feetTileIsAllPlatform) {
|
if (downDownVirtually && !occupyingTileHasPlatform && !feetTileIsAllPlatform) {
|
||||||
|
|||||||
Reference in New Issue
Block a user