diff --git a/Client/mods/deathmatch/logic/CClientPed.cpp b/Client/mods/deathmatch/logic/CClientPed.cpp index 30554d60b6e..80e2ed1e8fe 100644 --- a/Client/mods/deathmatch/logic/CClientPed.cpp +++ b/Client/mods/deathmatch/logic/CClientPed.cpp @@ -1706,14 +1706,12 @@ void CClientPed::SetUsesCollision(bool bUsesCollision) float CClientPed::GetMaxHealth() { - // TODO: Verify this formula - // Grab his player health stat float fStat = GetStat(MAX_HEALTH); // Do a linear interpolation to get how much health this would allow - // Assumes: 100 health = 569 stat, 200 health = 1000 stat. - float fMaxHealth = 100.0f + (100.0f / 431.0f * (fStat - 569.0f)); + // Assumes: 100 health = 569 stat, 176 health = 1000 stat. + float fMaxHealth = fStat * 0.176f; // Return the max health. Make sure it can't be below 1 if (fMaxHealth < 1.0f) diff --git a/Server/mods/deathmatch/logic/CPed.cpp b/Server/mods/deathmatch/logic/CPed.cpp index ba50c25caab..37b012be186 100644 --- a/Server/mods/deathmatch/logic/CPed.cpp +++ b/Server/mods/deathmatch/logic/CPed.cpp @@ -369,14 +369,12 @@ bool CPed::HasWeaponType(unsigned char ucWeaponType) float CPed::GetMaxHealth() { - // TODO: Verify this formula - // Grab his player health stat float fStat = GetPlayerStat(24 /*MAX_HEALTH*/); // Do a linear interpolation to get how much health this would allow - // Assumes: 100 health = 569 stat, 200 health = 1000 stat. - float fMaxHealth = 100.0f + (100.0f / 431.0f * (fStat - 569.0f)); + // Assumes: 100 health = 569 stat, 176 health = 1000 stat. + float fMaxHealth = fStat * 0.176f; // Return the max health. Make sure it can't be below 1 if (fMaxHealth < 1.0f)