free falling
after falling off most open maps you don't take damage you fall down into the level again above the entrance disabled smooth camera tracking for portals falling off map added a once every 7 seconds check to see if the player is suck inside the map if stuck you teleport to the level entrance catches about 90% of the ways to get stuck from falling too fast this might causing problems after more testing, not sure bug fixes
This commit is contained in:
@@ -245,7 +245,7 @@ const powerUps = {
|
||||
dupExplode() {
|
||||
for (let i = 0, len = powerUp.length; i < len; ++i) {
|
||||
if (powerUp[i].isDuplicated) {
|
||||
if (Math.random() < 0.003) { // (1-0.003)^240 = chance to be removed after 4 seconds, 240 = 4 seconds * 60 cycles per second
|
||||
if (Math.random() < 0.003 && !m.isBodiesAsleep) { // (1-0.003)^240 = chance to be removed after 4 seconds, 240 = 4 seconds * 60 cycles per second
|
||||
b.explosion(powerUp[i].position, 175 + (11 + 3 * Math.random()) * powerUp[i].size);
|
||||
Matter.Composite.remove(engine.world, powerUp[i]);
|
||||
powerUp.splice(i, 1);
|
||||
@@ -1070,7 +1070,7 @@ const powerUps = {
|
||||
const choose = options[Math.floor(Math.seededRandom(0, options.length))] //pick an element from the array of options
|
||||
if (tech.isBanish) {
|
||||
tech.tech[choose].isBanished = true
|
||||
if (i === 0) simulation.makeTextLog(`options.length = ${optionLengthNoDuplicates}`)
|
||||
if (i === 0) simulation.makeTextLog(`options.length = ${optionLengthNoDuplicates} <span class='color-text'>//tech removed from pool by decoherence</span>`)
|
||||
}
|
||||
removeOption(choose) //move from future options pool to avoid repeats on this selection
|
||||
tech.tech[choose].isRecentlyShown = true //this flag prevents this option from being shown the next time you pick up a tech power up
|
||||
|
||||
Reference in New Issue
Block a user