From 599f4fe34a4a3e360840979bd6eb54aecd70a629 Mon Sep 17 00:00:00 2001 From: lopezloo Date: Sat, 1 Jan 2022 12:58:43 +0100 Subject: [PATCH] Add possibility to start app with specific game and vehicle --- .gitignore | 3 +++ index.html | 71 +++++++++++++++++++++++++++++++++++++++++++++-------- loaddata.js | 8 ++++++ 3 files changed, 72 insertions(+), 10 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7f28877 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +iii/* +vc/* +sa/* diff --git a/index.html b/index.html index 422cee4..ec978ff 100644 --- a/index.html +++ b/index.html @@ -8,9 +8,9 @@
-III -VC -SA +III +VC +SA
@@ -40,44 +40,95 @@ diff --git a/loaddata.js b/loaddata.js index 409c06a..c6f708d 100644 --- a/loaddata.js +++ b/loaddata.js @@ -68,6 +68,14 @@ SelectModel(model) SetCarColors(CurrentModel.colors[0]); loadCar(model + ".dff"); + + window.location.hash = currentGame + '/' + model; +} + +function +SelectModelByID(modelID) { + model = ModelInfos[modelID]; + SelectModel(model.model); } function