chore: added fast drop 12b657e4
Steve · 2026-03-27 21:56 1 file(s) · +3 −1
src/actors/Dino.js +3 −1
14 14
    this.legsRate = null
15 15
    this.lift = null
16 16
    this.gravity = null
17 +
    this.fastFallMultiplier = 4
17 18
  }
18 19
19 20
  get y() {
48 49
  nextFrame() {
49 50
    if (this.vVelocity !== null) {
50 51
      // use gravity to gradually decrease vVelocity
51 -
      this.vVelocity += this.gravity
52 +
      const gravityForce = this.isDucking ? this.gravity * this.fastFallMultiplier : this.gravity
53 +
      this.vVelocity += gravityForce
52 54
      this.relativeY += this.vVelocity
53 55
    }
54 56