fixed the actual percentage to damage done and increase the percentage rates

This commit is contained in:
jenz 2024-05-05 11:23:02 +02:00
parent 6ab0461bf8
commit 9fb583385e

View File

@ -104,22 +104,22 @@ public Action announce_zone_controlls(Handle hTimer)
ct_control_percentage, "%", zm_control_percentage, "%", fought_percentage, "%");
if (ct_control_percentage > 90)
{
g_human_damage_addition = 50.0;
PrintToChatAll("CT controll over 90%s of zones. Applying 50%s extra damage", "%", "%");
g_human_damage_addition = 0.6;
PrintToChatAll("CT controll over 90%s of zones. Applying 60%s extra damage", "%", "%");
}
else if (ct_control_percentage > 70)
{
g_human_damage_addition = 30.0;
PrintToChatAll("CT controll over 70%s of zones. Applying 30%s extra damage", "%", "%");
g_human_damage_addition = 0.40;
PrintToChatAll("CT controll over 70%s of zones. Applying 40%s extra damage", "%", "%");
}
else if (ct_control_percentage > 50)
{
g_human_damage_addition = 10.0;
PrintToChatAll("CT controll over 50%s of zones. Applying 10%s extra damage", "%", "%");
g_human_damage_addition = 0.2;
PrintToChatAll("CT controll over 50%s of zones. Applying 20%s extra damage", "%", "%");
}
else
{
g_human_damage_addition = 1.0;
g_human_damage_addition = 1.0; //indicating no damage buffs
}
return Plugin_Handled;
}
@ -131,10 +131,9 @@ public void OnClientPutInServer(int client)
public Action OnTakeDamage(int client, int &attacker, int &inflictor, float &damage, int &damagetype)
{
if (IsValidClient(attacker) && GetClientTeam(attacker) == CS_TEAM_CT && g_human_damage_addition > 1.0)
if (IsValidClient(attacker) && GetClientTeam(attacker) == CS_TEAM_CT && g_human_damage_addition != 1.0)
{
//value lower than 1.0 will reduce the actual damage.
damage *= g_human_damage_addition;
damage += (g_human_damage_addition * damage);
return Plugin_Changed;
}
return Plugin_Continue;