aboutsummaryrefslogtreecommitdiff
path: root/views/script
diff options
context:
space:
mode:
authorMinteck <46352972+Minteck@users.noreply.github.com>2021-07-09 00:51:46 +0200
committerMinteck <46352972+Minteck@users.noreply.github.com>2021-07-09 00:51:46 +0200
commitb9e7ec33542bb8041857eb997d17b29ffeae40c8 (patch)
treeb90eed32c2acdc79f2f362ee031e762983195bfd /views/script
parent8886d5111aa4ae75f54f46c93f09fa7548979969 (diff)
downloadkartik-client-b9e7ec33542bb8041857eb997d17b29ffeae40c8.tar.gz
kartik-client-b9e7ec33542bb8041857eb997d17b29ffeae40c8.tar.bz2
kartik-client-b9e7ec33542bb8041857eb997d17b29ffeae40c8.zip
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.
Diffstat (limited to 'views/script')
-rw-r--r--views/script/game_debug.js4
1 files changed, 3 insertions, 1 deletions
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) => {