2022-12-06 16:12:02 +00:00
# pragma once
2022-11-12 18:35:28 +00:00
# include "services/script_patcher/script_patcher_service.hpp"
# include <script/scrProgramTable.hpp>
namespace big
{
void register_script_patches ( )
{
2022-12-18 23:15:52 +01:00
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " freemode " ) , " 2D 01 08 00 ? 38 00 5D ? ? ? 2A 06 " , 5 , { 0x71 , 0x2E , 0x01 , 0x01 } , & g . session . decloak_players } ) ;
2023-01-03 16:48:32 +00:00
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " freemode " ) , " 2D 01 04 00 ? 2C ? ? ? 5D ? ? ? 71 57 ? ? 2C " , 5 , { 0x2E , 0x01 , 0x00 } , nullptr } ) ; // script host kick
2023-02-13 20:38:30 +00:00
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " freemode " ) , " 2D 00 03 00 00 5D ? ? ? 71 08 " , 5 , { 0x2E , 0x00 , 0x00 } , & g . tunables . no_idle_kick } ) ;
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " freemode " ) , " 2D 00 03 00 00 5D ? ? ? 56 ? ? 72 2E ? ? 62 " , 5 , { 0x72 , 0x2E , 0x00 , 0x01 } , & g . tunables . no_idle_kick } ) ;
2022-12-14 16:27:40 +00:00
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " freemode " ) , " 5D ? ? ? 76 57 ? ? 5D ? ? ? 76 " , 0 , { 0x2E , 0x00 , 0x00 } , nullptr } ) ; // end session kick protection
2022-11-12 21:02:50 +00:00
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " freemode " ) , " 2D 01 09 00 00 5D ? ? ? 56 ? ? 2E " , 5 , { 0x2E , 0x01 , 0x00 } , nullptr } ) ; // disable death when undermap/spectating
2022-12-19 17:39:06 +00:00
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " freemode " ) , " 71 2E ? ? 55 ? ? 61 ? ? ? 47 ? ? 63 " , 0 , { 0x72 } , nullptr } ) ; // load island even if stranded animal IPL choice is not set
2022-12-22 21:23:32 +00:00
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " freemode " ) , " 2D 00 07 00 00 7B " , 5 , { 0x2E , 0x00 , 0x00 } , nullptr } ) ; // disable population load balancing
2023-01-22 21:57:32 +00:00
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " freemode " ) , " 2D 02 08 00 00 38 01 56 " , 5 , { 0x2E , 0x02 , 0x00 } , & g . session . block_muggers } ) ;
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " freemode " ) , " 2D 00 CF 00 00 " , 5 , { 0x2E , 0x00 , 0x00 } , & g . session . block_ceo_raids } ) ;
2022-12-14 16:27:40 +00:00
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " shop_controller " ) , " 2D 01 04 00 00 2C ? ? ? 56 ? ? 71 " , 5 , { 0x71 , 0x2E , 0x01 , 0x01 } , nullptr } ) ; // despawn bypass
2022-12-06 16:12:02 +00:00
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " shop_controller " ) , " 38 00 5D ? ? ? 38 00 5D ? ? ? 38 00 41 " , 0 , std : : vector < uint8_t > ( 12 , 0x0 ) , nullptr } ) ; // godmode/invisibility detection bypass
2023-02-04 16:35:18 +00:00
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " am_mp_nightclub " ) , " 2D 01 03 00 00 2C ? ? ? 56 ? ? 72 2E ? ? 38 00 " , 5 , { 0x72 , 0x2E , 0x01 , 0x01 } , & g . self . dance_mode } ) ;
g_script_patcher_service - > add_patch ( { RAGE_JOAAT ( " am_mp_nightclub " ) , " 20 56 ? ? 4F ? ? 46 ? ? 41 ? 71 " , 0 , { 0x2B , 0x55 } , & g . self . dance_mode } ) ;
2022-11-12 18:35:28 +00:00
for ( auto & entry : * g_pointers - > m_script_program_table )
{
if ( entry . m_program )
2022-11-12 21:02:50 +00:00
g_script_patcher_service - > on_script_load ( entry . m_program ) ;
2022-11-12 18:35:28 +00:00
}
}
}