diff --git a/js/bullets.js b/js/bullets.js index c382406..0d53915 100644 --- a/js/bullets.js +++ b/js/bullets.js @@ -162,6 +162,7 @@ const b = { } else { mech.fireCDcycle = mech.cycle + 30; //cooldown // game.makeTextLog("
Q, E, and mouse wheel change weapons
", 200); } if (mech.isHolding) { @@ -1163,7 +1164,7 @@ const b = { have: false, fire() { const THRUST = 0.0015 - const dir = mech.angle + (Math.random() - 0.5) * 0.7; + const dir = mech.angle + 0.2 * (Math.random() - 0.5); const me = bullet.length; const RADIUS = (4 + 4 * Math.random()) * b.modBulletSize bullet[me] = Bodies.circle(mech.pos.x + 30 * Math.cos(mech.angle), mech.pos.y + 30 * Math.sin(mech.angle), RADIUS, { @@ -1245,7 +1246,7 @@ const b = { } } }) - b.fireProps(mech.crouch ? 19 : 15, mech.crouch ? 30 : 1, dir, me); //cd , speed + b.fireProps(mech.crouch ? 19 : 15, mech.crouch ? 35 : 1, dir, me); //cd , speed b.drawOneBullet(bullet[me].vertices); } }, diff --git a/js/game.js b/js/game.js index 90a2ed7..26288ee 100644 --- a/js/game.js +++ b/js/game.js @@ -172,14 +172,18 @@ const game = { } document.getElementById("mods").innerHTML = text }, + replaceTextLog: true, makeTextLog(text, time = 180) { - document.getElementById("text-log").innerHTML = text; - document.getElementById("text-log").style.opacity = 1; - game.lastLogTime = mech.cycle + time; + if (game.replaceTextLog) { + document.getElementById("text-log").innerHTML = text; + document.getElementById("text-log").style.opacity = 1; + game.lastLogTime = mech.cycle + time; + } }, textLog() { if (game.lastLogTime && game.lastLogTime < mech.cycle) { game.lastLogTime = 0; + game.replaceTextLog = true // document.getElementById("text-log").innerHTML = " "; document.getElementById("text-log").style.opacity = 0; } @@ -269,6 +273,7 @@ const game = { requestAnimationFrame(cycle); } else { game.paused = true; + game.replaceTextLog = true; game.makeTextLog("