Quote:
Originally Posted by Shadowysn
The plugin doesn't consider pills-health in it's calculation.
|
Add:
PHP Code:
float GetTempHealth(int client)
{
float fGameTime = GetGameTime();
float fHealthTime = GetEntPropFloat(client, Prop_Send, "m_healthBufferTime");
float fHealth = GetEntPropFloat(client, Prop_Send, "m_healthBuffer");
fHealth -= (fGameTime - fHealthTime) * g_hCvar_PillsDecay.FloatValue;
return fHealth < 0.0 ? 0.0 : fHealth;
}
// This in plugin start:
g_hCvar_PillsDecay = FindConVar("pain_pills_decay_rate");
// You could hook the convar change and read into a float variable instead of doing g_hCvar_PillsDecay.FloatValue
and do:
PHP Code:
GetClientHealth(i) + GetTempHealth(i) < lowHealthLimitLimp
to get the accurate temp health value.
__________________