lower momentum needed to crouch on landing, laser-bot has less flicker

This commit is contained in:
landgreen
2019-12-08 03:58:11 -08:00
committed by GitHub
parent 7508b52d91
commit 1aab11203c
4 changed files with 42 additions and 45 deletions

View File

@@ -199,7 +199,7 @@ const mech = {
//sets a hard land where player stays in a crouch for a bit and can't jump
//crouch is forced in keyMove() on ground section below
const momentum = player.velocity.y * player.mass //player mass is 5 so this triggers at 20 down velocity, unless the player is holding something
if (momentum > 100) {
if (momentum > 120) {
this.doCrouch();
this.yOff = this.yOffWhen.jump;
this.hardLandCD = mech.cycle + Math.min(momentum / 6 - 6, 40)