diff --git a/Client/game_sa/CHudSA.cpp b/Client/game_sa/CHudSA.cpp index e379ea3dc0..10fdb18e4f 100644 --- a/Client/game_sa/CHudSA.cpp +++ b/Client/game_sa/CHudSA.cpp @@ -122,6 +122,9 @@ void CHudSA::InitComponentList() {1, HUD_VEHICLE_NAME, 1, FUNC_DrawVehicleName, 1, 0xCC, 0xC3}, {1, HUD_AREA_NAME, 1, FUNC_DrawAreaName, 1, 0xCC, 0xC3}, {1, HUD_RADAR, 1, FUNC_DrawRadar, 1, 0xCC, 0xC3}, + {1, HUD_RADAR_MAP, 1, FUNC_CRadar_DrawMap, 1, 0xCC, 0xC3}, + {1, HUD_RADAR_BLIPS, 1, FUNC_CRadar_DrawBlips, 1, 0xCC, 0xC3}, + {1, HUD_RADAR_ALTIMETER, 1, CODE_ShowRadarAltimeter, 2, 0xCC, 0xEB30}, {1, HUD_CLOCK, 0, VAR_DisableClock, 1, 1, 0}, {1, HUD_RADIO, 1, FUNC_DrawRadioName, 1, 0xCC, 0xC3}, {1, HUD_WANTED, 1, FUNC_DrawWantedLevel, 1, 0xCC, 0xC3}, diff --git a/Client/game_sa/CHudSA.h b/Client/game_sa/CHudSA.h index 4e0d830b1c..9584ccd71b 100644 --- a/Client/game_sa/CHudSA.h +++ b/Client/game_sa/CHudSA.h @@ -49,7 +49,11 @@ #define FUNC_CSprite2d_Draw 0x728350 #define FUNC_CSprite_RenderOneXLUSprite 0x70D000 +#define FUNC_CRadar_DrawMap 0x586B00 +#define FUNC_CRadar_DrawBlips 0x588050 + #define CODE_ShowMoney 0x58F47D +#define CODE_ShowRadarAltimeter 0x58A5A6 #define VAR_CTheScripts_bDrawCrossHair 0xA44490 #define VAR_RSGlobal 0xC17040 diff --git a/Client/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp b/Client/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp index eb3cb08904..7f7521452c 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp +++ b/Client/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp @@ -104,6 +104,9 @@ ADD_ENUM(HUD_MONEY, "money") ADD_ENUM(HUD_VEHICLE_NAME, "vehicle_name") ADD_ENUM(HUD_AREA_NAME, "area_name") ADD_ENUM(HUD_RADAR, "radar") +ADD_ENUM(HUD_RADAR_MAP, "radar_map") +ADD_ENUM(HUD_RADAR_BLIPS, "radar_blips") +ADD_ENUM(HUD_RADAR_ALTIMETER, "radar_altimeter") ADD_ENUM(HUD_CLOCK, "clock") ADD_ENUM(HUD_RADIO, "radio") ADD_ENUM(HUD_WANTED, "wanted") diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.cpp index 5ae695f0f8..54b58dab3b 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.cpp @@ -653,7 +653,8 @@ bool CLuaPlayerDefs::IsPlayerCrosshairVisible() bool CLuaPlayerDefs::SetPlayerHudComponentProperty(eHudComponent component, eHudComponentProperty property, std::variant value) { - if (component == HUD_ALL || component == HUD_CROSSHAIR || component == HUD_VITAL_STATS || component == HUD_HELP_TEXT || component == HUD_RADAR) + if (component == HUD_ALL || component == HUD_CROSSHAIR || component == HUD_VITAL_STATS || component == HUD_HELP_TEXT || component == HUD_RADAR + || component == HUD_RADAR_MAP || component == HUD_RADAR_BLIPS || component == HUD_RADAR_ALTIMETER) return false; CHud* hud = g_pGame->GetHud(); diff --git a/Client/sdk/game/CHud.h b/Client/sdk/game/CHud.h index 8b3e2e37fd..a4dca3f1f4 100644 --- a/Client/sdk/game/CHud.h +++ b/Client/sdk/game/CHud.h @@ -31,6 +31,9 @@ enum eHudComponent HUD_ALL, HUD_VITAL_STATS, HUD_HELP_TEXT, + HUD_RADAR_MAP, + HUD_RADAR_BLIPS, + HUD_RADAR_ALTIMETER, }; enum class eHudComponentProperty diff --git a/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp b/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp index 0125f4549c..801d72cf60 100644 --- a/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp +++ b/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp @@ -78,6 +78,9 @@ ADD_ENUM(HUD_MONEY, "money") ADD_ENUM(HUD_VEHICLE_NAME, "vehicle_name") ADD_ENUM(HUD_AREA_NAME, "area_name") ADD_ENUM(HUD_RADAR, "radar") +ADD_ENUM(HUD_RADAR_MAP, "radar_map") +ADD_ENUM(HUD_RADAR_BLIPS, "radar_blips") +ADD_ENUM(HUD_RADAR_ALTIMETER, "radar_altimeter") ADD_ENUM(HUD_CLOCK, "clock") ADD_ENUM(HUD_RADIO, "radio") ADD_ENUM(HUD_WANTED, "wanted") diff --git a/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h b/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h index 62d4312c51..d9dcb23ee5 100644 --- a/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h +++ b/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h @@ -56,6 +56,11 @@ enum eHudComponent HUD_WANTED, HUD_CROSSHAIR, HUD_ALL, + HUD_VITAL_STATS, // Unused on server, but used on client side + HUD_HELP_TEXT, // Unused on server, but used on client side + HUD_RADAR_MAP, + HUD_RADAR_BLIPS, + HUD_RADAR_ALTIMETER, }; DECLARE_ENUM(eHudComponent);