From fc85bb710b99cbd0122ccb720d0eb24f74f62638 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 2 May 2020 19:39:26 +0300 Subject: Fix COMMAND_GET_CONTROLLER_MODE --- src/control/Script.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/control/Script.cpp') diff --git a/src/control/Script.cpp b/src/control/Script.cpp index b63a5d87..3e06fcfb 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -5250,7 +5250,11 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) return 0; } case COMMAND_GET_CONTROLLER_MODE: +#if defined(GTA_PC) && !defined(DETECT_PAD_INPUT_SWITCH) ScriptParams[0] = 0; +#else + ScriptParams[0] = CPad::GetPad(0)->Mode; +#endif StoreParameters(&m_nIp, 1); return 0; case COMMAND_SET_CAN_RESPRAY_CAR: -- cgit v1.2.3 From d2712afc788e59973b5331eb8d10870239d803e4 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 3 May 2020 00:11:02 +0300 Subject: Add CURMODE macro --- src/control/Script.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/control/Script.cpp') diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 3e06fcfb..dbae1f21 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -5253,7 +5253,7 @@ int8 CRunningScript::ProcessCommands600To699(int32 command) #if defined(GTA_PC) && !defined(DETECT_PAD_INPUT_SWITCH) ScriptParams[0] = 0; #else - ScriptParams[0] = CPad::GetPad(0)->Mode; + ScriptParams[0] = CPad::IsAffectedByController ? CPad::GetPad(0)->Mode : 0; #endif StoreParameters(&m_nIp, 1); return 0; -- cgit v1.2.3