From 279ed655bb4164ad20d273277e4f3a030471fe85 Mon Sep 17 00:00:00 2001 From: Abu Murugesan <45307264+abumsd7@users.noreply.github.com> Date: Tue, 2 Jun 2026 23:58:59 +0530 Subject: [PATCH 1/2] Updated ControllerAction enum In-game says 14 and 15 are PED_DUCK and PED_ANSWER_PHONE and it ends at SWITCH_DEBUG_CAM_ON (40). However the enum here removes 14 and 15 for some reason and adds last 2 actions. This was disrupting one of my mods in runtime when the actionNames are matched with actions. --- plugin_vc/game_vc/CControllerConfigManager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin_vc/game_vc/CControllerConfigManager.h b/plugin_vc/game_vc/CControllerConfigManager.h index c7c08d2e..6ceb5a59 100644 --- a/plugin_vc/game_vc/CControllerConfigManager.h +++ b/plugin_vc/game_vc/CControllerConfigManager.h @@ -25,6 +25,8 @@ enum e_ControllerAction { PED_JUMPING, PED_SPRINT, PED_LOOKBEHIND, + PED_DUCK, + PED_ANSWER_PHONE, VEHICLE_ACCELERATE, VEHICLE_BRAKE, VEHICLE_CHANGE_RADIO_STATION, @@ -50,8 +52,6 @@ enum e_ControllerAction { CONTROLLERACTION_36, TOGGLE_DPAD, SWITCH_DEBUG_CAM_ON, - TAKE_SCREEN_SHOT, - SHOW_MOUSE_POINTER_TOGGLE, NUM_CONTROLLER_ACTIONS, }; From f0365100ae8b08081818bb3b3801fd4b2f2ec934 Mon Sep 17 00:00:00 2001 From: Abu Murugesan <45307264+abumsd7@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:00:54 +0530 Subject: [PATCH 2/2] Update controller config offsets and actions Looks the enum had 3 entries missed. This caused a offset issue where the array was pointing to a wrong location. Which were causing issues when I tried to assign action names to actions. --- plugin_vc/game_vc/CControllerConfigManager.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugin_vc/game_vc/CControllerConfigManager.h b/plugin_vc/game_vc/CControllerConfigManager.h index 6ceb5a59..c7d37dfc 100644 --- a/plugin_vc/game_vc/CControllerConfigManager.h +++ b/plugin_vc/game_vc/CControllerConfigManager.h @@ -52,6 +52,9 @@ enum e_ControllerAction { CONTROLLERACTION_36, TOGGLE_DPAD, SWITCH_DEBUG_CAM_ON, + TAKE_SCREEN_SHOT, + SHOW_MOUSE_POINTER_TOGGLE, + UNKNOWN_ACTION, NUM_CONTROLLER_ACTIONS, }; @@ -93,10 +96,10 @@ VALIDATE_OFFSET(CControllerConfigManager, m_bFirstCapture, 0x0); VALIDATE_OFFSET(CControllerConfigManager, m_OldState, 0x4); VALIDATE_OFFSET(CControllerConfigManager, m_NewState, 0x114); VALIDATE_OFFSET(CControllerConfigManager, m_aActionNames, 0x224); -VALIDATE_OFFSET(CControllerConfigManager, m_aButtonStates, 0xEF4); -VALIDATE_OFFSET(CControllerConfigManager, m_actions, 0xF08); -VALIDATE_OFFSET(CControllerConfigManager, m_aSimCheckers, 0x1428); -VALIDATE_OFFSET(CControllerConfigManager, m_bMouseAssociated, 0x1438); -VALIDATE_SIZE(CControllerConfigManager, 0x143C); +VALIDATE_OFFSET(CControllerConfigManager, m_aButtonStates, 0xFE4); // Real Game: 0xFE4 (instead of 0xEF4) +VALIDATE_OFFSET(CControllerConfigManager, m_actions, 0xFF8); // Real Game: 0xFF8 (instead of 0xF08) +VALIDATE_OFFSET(CControllerConfigManager, m_aSimCheckers, 0x1578); // Real Game: 0x1578 (instead of 0x1428) +VALIDATE_OFFSET(CControllerConfigManager, m_bMouseAssociated, 0x1588); // Real Game: 0x1588 (instead of 0x1438) +VALIDATE_SIZE(CControllerConfigManager, 0x158C); // Real Game: 0x158C (instead of 0x143C) extern CControllerConfigManager& ControlsManager;