File tree 2 files changed +4
-8
lines changed
Client/mods/deathmatch/logic
Server/mods/deathmatch/logic
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1706,14 +1706,12 @@ void CClientPed::SetUsesCollision(bool bUsesCollision)
1706
1706
1707
1707
float CClientPed::GetMaxHealth ()
1708
1708
{
1709
- // TODO: Verify this formula
1710
-
1711
1709
// Grab his player health stat
1712
1710
float fStat = GetStat (MAX_HEALTH);
1713
1711
1714
1712
// Do a linear interpolation to get how much health this would allow
1715
- // Assumes: 100 health = 569 stat, 200 health = 1000 stat.
1716
- float fMaxHealth = 100 . 0f + ( 100 . 0f / 431 . 0f * ( fStat - 569 . 0f )) ;
1713
+ // Assumes: 100 health = 569 stat, 176 health = 1000 stat.
1714
+ float fMaxHealth = fStat * 0 . 176f ;
1717
1715
1718
1716
// Return the max health. Make sure it can't be below 1
1719
1717
if (fMaxHealth < 1 .0f )
Original file line number Diff line number Diff line change @@ -369,14 +369,12 @@ bool CPed::HasWeaponType(unsigned char ucWeaponType)
369
369
370
370
float CPed::GetMaxHealth ()
371
371
{
372
- // TODO: Verify this formula
373
-
374
372
// Grab his player health stat
375
373
float fStat = GetPlayerStat (24 /* MAX_HEALTH*/ );
376
374
377
375
// Do a linear interpolation to get how much health this would allow
378
- // Assumes: 100 health = 569 stat, 200 health = 1000 stat.
379
- float fMaxHealth = 100 . 0f + ( 100 . 0f / 431 . 0f * ( fStat - 569 . 0f )) ;
376
+ // Assumes: 100 health = 569 stat, 176 health = 1000 stat.
377
+ float fMaxHealth = fStat * 0 . 176f ;
380
378
381
379
// Return the max health. Make sure it can't be below 1
382
380
if (fMaxHealth < 1 .0f )
You can’t perform that action at this time.
0 commit comments