File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Top Open diff view settings
Client/mods/deathmatch/logic
Server/mods/deathmatch/logic Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Top Open diff view settings Original file line number Diff line number Diff line change @@ -1706,14 +1706,12 @@ void CClientPed::SetUsesCollision(bool bUsesCollision)
17061706
17071707float CClientPed::GetMaxHealth ()
17081708{
1709- // TODO: Verify this formula
1710-
17111709 // Grab his player health stat
17121710 float fStat = GetStat (MAX_HEALTH);
17131711
17141712 // 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 ;
17171715
17181716 // Return the max health. Make sure it can't be below 1
17191717 if (fMaxHealth < 1 .0f )
Original file line number Diff line number Diff line change @@ -369,14 +369,12 @@ bool CPed::HasWeaponType(unsigned char ucWeaponType)
369369
370370float CPed::GetMaxHealth ()
371371{
372- // TODO: Verify this formula
373-
374372 // Grab his player health stat
375373 float fStat = GetPlayerStat (24 /* MAX_HEALTH*/ );
376374
377375 // 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 ;
380378
381379 // Return the max health. Make sure it can't be below 1
382380 if (fMaxHealth < 1 .0f )
You can’t perform that action at this time.
0 commit comments