summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-08-08 16:41:35 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-08-08 16:41:35 +0200
commit35dd465c19b2fa0f00bd49ca921d19ec8f2dcf19 (patch)
tree0597056b93949af95e2bdeb2d90ca90712aad758
parentsmall fix (diff)
downloadre3-35dd465c19b2fa0f00bd49ca921d19ec8f2dcf19.tar
re3-35dd465c19b2fa0f00bd49ca921d19ec8f2dcf19.tar.gz
re3-35dd465c19b2fa0f00bd49ca921d19ec8f2dcf19.tar.bz2
re3-35dd465c19b2fa0f00bd49ca921d19ec8f2dcf19.tar.lz
re3-35dd465c19b2fa0f00bd49ca921d19ec8f2dcf19.tar.xz
re3-35dd465c19b2fa0f00bd49ca921d19ec8f2dcf19.tar.zst
re3-35dd465c19b2fa0f00bd49ca921d19ec8f2dcf19.zip
-rw-r--r--src/control/Script.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 77d571d0..4501c27f 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -502,11 +502,6 @@ int CTheScripts::ScriptToLoad = 0;
int CTheScripts::OpenScript()
{
- // glfwGetKey doesn't work because of CGame::Initialise is blocking
- CPad::UpdatePads();
- if (CPad::GetPad(0)->GetChar('G')) ScriptToLoad = 0;
- if (CPad::GetPad(0)->GetChar('R')) ScriptToLoad = 1;
- if (CPad::GetPad(0)->GetChar('D')) ScriptToLoad = 2;
CFileMgr::ChangeDir("\\");
switch (ScriptToLoad) {
case 0: return CFileMgr::OpenFile("data\\main.scm", "rb");
@@ -530,6 +525,12 @@ void CTheScripts::Init()
UpsideDownCars.Init();
StuckCars.Init();
#ifdef USE_DEBUG_SCRIPT_LOADER
+ // glfwGetKey doesn't work because of CGame::Initialise is blocking
+ CPad::UpdatePads();
+ if(CPad::GetPad(0)->GetChar('G')) ScriptToLoad = 0;
+ if(CPad::GetPad(0)->GetChar('R')) ScriptToLoad = 1;
+ if(CPad::GetPad(0)->GetChar('D')) ScriptToLoad = 2;
+
int mainf = OpenScript();
#else
CFileMgr::SetDir("data");