From b9e7ec33542bb8041857eb997d17b29ffeae40c8 Mon Sep 17 00:00:00 2001 From: Minteck <46352972+Minteck@users.noreply.github.com> Date: Fri, 9 Jul 2021 00:51:46 +0200 Subject: Add cooldown to rotations This helps fix some bugs such as an out of border usebug and a bug that enables players to count a lap as they die. This also makes the game more realistic by removing the possibility of doing moves that are not supposed to be possible in real life. --- views/script/game_debug.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/script/game_debug.js b/views/script/game_debug.js index edcdc26..1fb2639 100644 --- a/views/script/game_debug.js +++ b/views/script/game_debug.js @@ -194,6 +194,7 @@ setInterval(() => { changedDataLeft += "\n0$: Laps: " + document.getElementById('laps-car0').innerText + "/5"; changedDataLeft += "\n0$: Model: " + selectedModel0; + changedDataLeft += "\n0$: Collision: " + (car0collisionon ? "%true%" : "%false%"); changedDataLeft += "\n\n1$: XY: " + document.getElementById('car1').style.left.split("px")[0] + " / " + document.getElementById('car1').style.top.split("px")[0] @@ -212,6 +213,7 @@ setInterval(() => { changedDataLeft += "\n1$: Laps: " + document.getElementById('laps-car1').innerText + "/5"; changedDataLeft += "\n1$: Model: " + selectedModel1; + changedDataLeft += "\n1$: Collision: " + (car1collisionon ? "%true%" : "%false%"); changedDataLeft += "\n" + oil(0) + oil(1) + oil(2) + oil(3) + oil(4); changedDataLeft += "\n\nMusic: " + i; changedDataLeft += "\nCircuit: " + rand; @@ -252,7 +254,7 @@ setInterval(() => { } catch (e) { console.error(e); } -},1000); +},100); window.addEventListener("load", () => { require('@electron/remote').app.getGPUInfo('complete').then((data) => { -- cgit