mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
moving platform fix: double speed gain
This commit is contained in:
@@ -133,7 +133,7 @@ abstract class PhysContraption() : ActorWithBody() {
|
||||
INGAME.actorNowPlaying?.let { candidates.add(it) }
|
||||
|
||||
for (actor in candidates) {
|
||||
if (!actorsRiding.contains(actor.referenceID) && isActorOnTop(actor)) {
|
||||
if (!actorsRiding.contains(actor.referenceID) && actor.platformsRiding.isEmpty() && isActorOnTop(actor)) {
|
||||
mount(actor)
|
||||
snapRiderToSurface(actor)
|
||||
// Landing on the contraption kills all vertical velocity.
|
||||
|
||||
@@ -18,7 +18,7 @@ import kotlin.math.sin
|
||||
class ActorTestPlatform : ActorMovingPlatform(8) {
|
||||
|
||||
/** Movement pattern index (0-3). */
|
||||
private val pattern: Int = (0..3).random()
|
||||
private val pattern: Int = (0..1).random()
|
||||
|
||||
/** Speed in pixels per tick (2.0 to 4.0). */
|
||||
private val speed: Double = 2.0 + Math.random() * 2.0
|
||||
|
||||
Reference in New Issue
Block a user