Add player stats informations
This commit is contained in:
@@ -46,6 +46,9 @@ static float g_Sharpening = 3.22f;
|
|||||||
static float g_WorldTimeDilationValue = 1.f;
|
static float g_WorldTimeDilationValue = 1.f;
|
||||||
static float g_AITimeDilationValue = 1.f;
|
static float g_AITimeDilationValue = 1.f;
|
||||||
static int g_HUDOffsets = 0;
|
static int g_HUDOffsets = 0;
|
||||||
|
static float g_Health = 0.f;
|
||||||
|
static float g_Stamina = 0.f;
|
||||||
|
static float g_Mana = 0.f;
|
||||||
static bool user_inputs_logged = false;
|
static bool user_inputs_logged = false;
|
||||||
|
|
||||||
// Shared values
|
// Shared values
|
||||||
@@ -202,6 +205,9 @@ extern "C" __declspec(dllexport) void GetGameInfos(GameInfos* infos) {
|
|||||||
infos->FOVOut = g_FOV_Out;
|
infos->FOVOut = g_FOV_Out;
|
||||||
infos->cameraIn = g_Camera_In;
|
infos->cameraIn = g_Camera_In;
|
||||||
infos->cameraOut = g_Camera_Out;
|
infos->cameraOut = g_Camera_Out;
|
||||||
|
infos->Health = g_Health;
|
||||||
|
infos->Stamina = g_Stamina;
|
||||||
|
infos->Mana = g_Mana;
|
||||||
infos->consoleEnabled = g_Console_Enabled;
|
infos->consoleEnabled = g_Console_Enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,6 +343,11 @@ static void EnableCheats(Cheat cheat) {
|
|||||||
// Get player pawn
|
// Get player pawn
|
||||||
APawn* playerPawn = GetPawnFromWorld();
|
APawn* playerPawn = GetPawnFromWorld();
|
||||||
if (playerPawn && playerPawn->Class) {
|
if (playerPawn && playerPawn->Class) {
|
||||||
|
// Retrieve current values for UI Reshade addon
|
||||||
|
g_Health = UBGUFunctionLibraryCS::GetAttrValue(playerPawn, EBGUAttrFloat::Hp);
|
||||||
|
g_Stamina = UBGUFunctionLibraryCS::GetAttrValue(playerPawn, EBGUAttrFloat::Stamina);
|
||||||
|
g_Mana = UBGUFunctionLibraryCS::GetAttrValue(playerPawn, EBGUAttrFloat::Mp);
|
||||||
|
|
||||||
if (g_GodMode_fix_enabled) { // God mode cheat
|
if (g_GodMode_fix_enabled) { // God mode cheat
|
||||||
float maxHp = UBGUFunctionLibraryCS::GetAttrValue(playerPawn,EBGUAttrFloat::HpMax);
|
float maxHp = UBGUFunctionLibraryCS::GetAttrValue(playerPawn,EBGUAttrFloat::HpMax);
|
||||||
UBGUFunctionLibraryCS::BGUSetAttrValue(playerPawn, EBGUAttrFloat::Hp, maxHp);
|
UBGUFunctionLibraryCS::BGUSetAttrValue(playerPawn, EBGUAttrFloat::Hp, maxHp);
|
||||||
|
|||||||
Reference in New Issue
Block a user