explosion drop bug fix

This commit is contained in:
landgreen
2020-04-26 05:33:11 -07:00
parent d24ea799cb
commit b16105abb6
3 changed files with 10 additions and 5 deletions

View File

@@ -1822,17 +1822,15 @@ const b = {
mech.energy += Math.max(radius * 0.0003, 0.15)
} else {
mech.damage(radius * 0.0002); //normal player damage from explosions
mech.drop();
}
knock = Vector.mult(Vector.normalise(sub), -Math.sqrt(dmg) * player.mass / 30);
player.force.x += knock.x;
player.force.y += knock.y;
mech.drop();
} else if (dist < alertRange) {
knock = Vector.mult(Vector.normalise(sub), -Math.sqrt(dmg) * player.mass / 55);
player.force.x += knock.x;
player.force.y += knock.y;
mech.drop();
}
//body knock backs