elevators
jump now applies the velocity of the block you jumped off of it might feel slightly different if you play n-gon often it could add some bugs so let me know elevators have more realistic physics you can jump off them when they get to the top (fun!) blocks interact with them in a more healthy way (no bleed through) they can have a wider range of healthy speeds it can hurt mobs
This commit is contained in:
11
js/player.js
11
js/player.js
@@ -264,10 +264,11 @@ const m = {
|
||||
x: 0,
|
||||
y: m.jumpForce * 0.12 * Math.min(m.standingOn.mass, 5)
|
||||
});
|
||||
|
||||
player.force.y = -m.jumpForce; //player jump force
|
||||
Matter.Body.setVelocity(player, { //zero player y-velocity for consistent jumps
|
||||
x: player.velocity.x,
|
||||
y: 0
|
||||
y: Math.max(-10, Math.min(m.standingOn.velocity.y, 10)) //cap velocity contribution from blocks you are standing on to 10 in the vertical
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1632,14 +1633,14 @@ const m = {
|
||||
// m.fieldMeterColor = "#0c5"
|
||||
// m.eyeFillColor = m.fieldMeterColor
|
||||
m.hold = function() {
|
||||
if (m.energy > m.maxEnergy - 0.02 && m.fieldCDcycle < m.cycle && !input.field && bullet.length < 200 && (m.cycle % 2)) {
|
||||
if (m.energy > m.maxEnergy - 0.02 && m.fieldCDcycle < m.cycle && !input.field && bullet.length < 150 && (m.cycle % 2)) {
|
||||
if (tech.isSporeField) {
|
||||
for (let i = 0; i < 30; i++) {
|
||||
m.energy -= 0.088
|
||||
for (let i = 0, len = Math.random() * 20; i < len; i++) {
|
||||
m.energy -= 0.085
|
||||
if (m.energy > 0) {
|
||||
b.spore(m.pos)
|
||||
} else {
|
||||
m.energy = 0.01
|
||||
m.energy = 0.001
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user