|
|
@@ -479,11 +479,13 @@ function constrainRel(coords) { |
|
|
y: Math.min(Math.max(coords.y, config.y), worldHeight + config.y) |
|
|
y: Math.min(Math.max(coords.y, config.y), worldHeight + config.y) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// not using constrainRel anymore |
|
|
function snapPos(coords) { |
|
|
function snapPos(coords) { |
|
|
return constrainRel({ |
|
|
|
|
|
|
|
|
return { |
|
|
x: coords.x, |
|
|
x: coords.x, |
|
|
y: (!config.lockYAxis || altHeld) ? coords.y : (Math.abs(coords.y) < config.height.toNumber("meters")/20 ? 0 : coords.y) |
|
|
y: (!config.lockYAxis || altHeld) ? coords.y : (Math.abs(coords.y) < config.height.toNumber("meters")/20 ? 0 : coords.y) |
|
|
}); |
|
|
|
|
|
|
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function adjustAbs(coords, oldHeight, newHeight) { |
|
|
function adjustAbs(coords, oldHeight, newHeight) { |
|
|
|