// destructible walls that can be used to trigger target_objective_decrease
bool destructible_heal(entity targ, entity inflictor, float amount, float limit)
{
- float true_limit = ((limit) ? limit : targ.max_health);
+ float true_limit = ((limit >= 0) ? limit : targ.max_health);
if(GetResourceAmount(targ, RESOURCE_HEALTH) <= 0 || GetResourceAmount(targ, RESOURCE_HEALTH) >= true_limit)
return false;
bool ons_ControlPoint_Icon_Heal(entity targ, entity inflictor, float amount, float limit)
{
- float true_limit = ((limit) ? limit : targ.max_health);
+ float true_limit = ((limit >= 0) ? limit : targ.max_health);
if(GetResourceAmount(targ, RESOURCE_HEALTH) <= 0 || GetResourceAmount(targ, RESOURCE_HEALTH) >= true_limit)
return false;
bool ons_GeneratorHeal(entity targ, entity inflictor, float amount, float limit)
{
- float true_limit = ((limit) ? limit : targ.max_health);
+ float true_limit = ((limit >= 0) ? limit : targ.max_health);
if(GetResourceAmount(targ, RESOURCE_HEALTH) <= 0 || GetResourceAmount(targ, RESOURCE_HEALTH) >= true_limit)
return false;
bool Monster_Heal(entity targ, entity inflictor, float amount, float limit)
{
- float true_limit = ((limit) ? limit : targ.max_health);
+ float true_limit = ((limit >= 0) ? limit : targ.max_health);
if(GetResourceAmount(targ, RESOURCE_HEALTH) <= 0 || GetResourceAmount(targ, RESOURCE_HEALTH) >= true_limit)
return false;
bool vehicles_heal(entity targ, entity inflictor, float amount, float limit)
{
- float true_limit = ((limit) ? limit : targ.max_health);
+ float true_limit = ((limit >= 0) ? limit : targ.max_health);
//if(GetResourceAmount(targ, RESOURCE_HEALTH) <= 0 || GetResourceAmount(targ, RESOURCE_HEALTH) >= true_limit)
if(targ.vehicle_health <= 0 || targ.vehicle_health >= true_limit)
return false;
{
float roothealth = ((burst) ? WEP_CVAR(arc, burst_healing_hps) : WEP_CVAR(arc, beam_healing_hps));
float rootarmor = ((burst) ? WEP_CVAR(arc, burst_healing_aps) : WEP_CVAR(arc, beam_healing_aps));
- float hplimit = ((IS_PLAYER(trace_ent)) ? WEP_CVAR(arc, beam_healing_hmax) : 0);
+ float hplimit = ((IS_PLAYER(trace_ent)) ? WEP_CVAR(arc, beam_healing_hmax) : -1);
Heal(trace_ent, own, (roothealth * coefficient), hplimit);
if(IS_PLAYER(trace_ent) && rootarmor)
{