fixed time dilation bug

This commit is contained in:
landgreen
2020-03-17 03:47:07 -07:00
parent 5768664d27
commit 114be654cf
2 changed files with 3 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ const level = {
if (level.levelsCleared === 0) { if (level.levelsCleared === 0) {
// level.difficultyIncrease(9) // level.difficultyIncrease(9)
// b.giveGuns("mine") // b.giveGuns("mine")
// mech.setField("phase decoherence field") // mech.setField("time dilation field")
// b.giveMod("irradiated needles"); // b.giveMod("irradiated needles");
// b.giveMod("reflective cavity"); // b.giveMod("reflective cavity");

View File

@@ -1102,6 +1102,7 @@ const mech = {
}, },
wakeCheck() { wakeCheck() {
if (mech.isBodiesAsleep) { if (mech.isBodiesAsleep) {
console.log('in')
mech.isBodiesAsleep = false; mech.isBodiesAsleep = false;
function wake(who) { function wake(who) {
@@ -1284,7 +1285,7 @@ const mech = {
mech.holdingTarget = null; //clears holding target (this is so you only pick up right after the field button is released and a hold target exists) mech.holdingTarget = null; //clears holding target (this is so you only pick up right after the field button is released and a hold target exists)
} }
mech.drawFieldMeter() mech.drawFieldMeter()
if (mech.fieldMode !== 1) mech.wakeCheck(); //wake up if this is no longer the current field mode, like after a new power up if (mech.fieldMode !== 2) mech.wakeCheck(); //wake up if this is no longer the current field mode, like after a new power up
} }
} }
}, },