File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Client/mods/deathmatch/logic
Server/mods/deathmatch/logic Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1713,14 +1713,12 @@ void CClientPed::SetUsesCollision(bool bUsesCollision)
17131713
17141714float CClientPed::GetMaxHealth ()
17151715{
1716- // TODO: Verify this formula
1717-
17181716 // Grab his player health stat
17191717 float fStat = GetStat (MAX_HEALTH);
17201718
17211719 // Do a linear interpolation to get how much health this would allow
1722- // Assumes: 100 health = 569 stat, 200 health = 1000 stat.
1723- float fMaxHealth = 100 . 0f + ( 100 . 0f / 431 . 0f * ( fStat - 569 . 0f )) ;
1720+ // Assumes: 100 health = 569 stat, 176 health = 1000 stat.
1721+ float fMaxHealth = fStat * 0 . 176f ;
17241722
17251723 // Return the max health. Make sure it can't be below 1
17261724 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