fixed the actual percentage to damage done and increase the percentage rates
This commit is contained in:
		
							parent
							
								
									6ab0461bf8
								
							
						
					
					
						commit
						9fb583385e
					
				| @ -104,22 +104,22 @@ public Action announce_zone_controlls(Handle hTimer) | |||||||
|         ct_control_percentage, "%", zm_control_percentage, "%", fought_percentage, "%"); |         ct_control_percentage, "%", zm_control_percentage, "%", fought_percentage, "%"); | ||||||
|     if (ct_control_percentage > 90) |     if (ct_control_percentage > 90) | ||||||
|     { |     { | ||||||
|         g_human_damage_addition = 50.0; |         g_human_damage_addition = 0.6; | ||||||
|         PrintToChatAll("CT controll over 90%s of zones. Applying 50%s extra damage", "%", "%"); |         PrintToChatAll("CT controll over 90%s of zones. Applying 60%s extra damage", "%", "%"); | ||||||
|     } |     } | ||||||
|     else if (ct_control_percentage > 70) |     else if (ct_control_percentage > 70) | ||||||
|     { |     { | ||||||
|         g_human_damage_addition = 30.0; |         g_human_damage_addition = 0.40; | ||||||
|         PrintToChatAll("CT controll over 70%s of zones. Applying 30%s extra damage", "%", "%"); |         PrintToChatAll("CT controll over 70%s of zones. Applying 40%s extra damage", "%", "%"); | ||||||
|     } |     } | ||||||
|     else if (ct_control_percentage > 50) |     else if (ct_control_percentage > 50) | ||||||
|     { |     { | ||||||
|         g_human_damage_addition = 10.0; |         g_human_damage_addition = 0.2; | ||||||
|         PrintToChatAll("CT controll over 50%s of zones. Applying 10%s extra damage", "%", "%"); |         PrintToChatAll("CT controll over 50%s of zones. Applying 20%s extra damage", "%", "%"); | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|         g_human_damage_addition = 1.0; |         g_human_damage_addition = 1.0; //indicating no damage buffs | ||||||
|     } |     } | ||||||
|     return Plugin_Handled; |     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)  | 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); | ||||||
|         damage *= g_human_damage_addition; |  | ||||||
|         return Plugin_Changed; |         return Plugin_Changed; | ||||||
|     } |     } | ||||||
|     return Plugin_Continue; |     return Plugin_Continue; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user