From 4b133ebc4022ae30e71fa72bf8ca6aa49ebdae77 Mon Sep 17 00:00:00 2001
From: BotoX <github@botox.bz>
Date: Sat, 28 Sep 2019 03:19:25 +0200
Subject: [PATCH] DamageProxy update

---
 .../damageproxy/ze_lotr_minas_tirith_v3_3.cfg | 45 +++++++++++++
 .../damageproxy/ze_lotr_mount_doom_v3.cfg     |  8 +++
 .../ze_paranoid_rezurrection_v11_9.cfg        | 56 ++++++++++++++++
 .../ze_pirates_port_royal_v3_6.cfg            |  8 +++
 .../damageproxy/ze_tesv_skyrim_v4fix.cfg      | 67 +++++++++++++------
 DamageProxy/scripting/DamageProxy.sp          |  8 ++-
 6 files changed, 168 insertions(+), 24 deletions(-)
 create mode 100644 DamageProxy/configs/damageproxy/ze_lotr_minas_tirith_v3_3.cfg
 create mode 100644 DamageProxy/configs/damageproxy/ze_lotr_mount_doom_v3.cfg
 create mode 100644 DamageProxy/configs/damageproxy/ze_paranoid_rezurrection_v11_9.cfg
 create mode 100644 DamageProxy/configs/damageproxy/ze_pirates_port_royal_v3_6.cfg

diff --git a/DamageProxy/configs/damageproxy/ze_lotr_minas_tirith_v3_3.cfg b/DamageProxy/configs/damageproxy/ze_lotr_minas_tirith_v3_3.cfg
new file mode 100644
index 00000000..4c78fd7c
--- /dev/null
+++ b/DamageProxy/configs/damageproxy/ze_lotr_minas_tirith_v3_3.cfg
@@ -0,0 +1,45 @@
+"items"
+{
+	"z1518692" // Nazgul
+	{
+		"KnockbackMaxVel"	"500"
+		"KnockbackScale"	"1.0"
+	}
+
+	"z1397647" // Troll
+	{
+		"KnockbackMaxVel"	"400"
+		"KnockbackScale"	"0.40"
+	}
+
+	"z2420963" // Balrog
+	{
+		"KnockbackMaxVel"	"50"
+		"KnockbackScale"	"0.05"
+	}
+
+
+	"h6082267" // Armor
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
+
+	"h2347138" // Horse
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
+
+	"h2347448" // Gandalf
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
+
+	"h2384422" // White Knight
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
+}
diff --git a/DamageProxy/configs/damageproxy/ze_lotr_mount_doom_v3.cfg b/DamageProxy/configs/damageproxy/ze_lotr_mount_doom_v3.cfg
new file mode 100644
index 00000000..0c62f08d
--- /dev/null
+++ b/DamageProxy/configs/damageproxy/ze_lotr_mount_doom_v3.cfg
@@ -0,0 +1,8 @@
+"items"
+{
+	"z1385" // Nazgul
+	{
+		"KnockbackMaxVel"	"500"
+		"KnockbackScale"	"1.0"
+	}
+}
diff --git a/DamageProxy/configs/damageproxy/ze_paranoid_rezurrection_v11_9.cfg b/DamageProxy/configs/damageproxy/ze_paranoid_rezurrection_v11_9.cfg
new file mode 100644
index 00000000..7ac3c527
--- /dev/null
+++ b/DamageProxy/configs/damageproxy/ze_paranoid_rezurrection_v11_9.cfg
@@ -0,0 +1,56 @@
+"items"
+{
+	"z145960" // T-Rex
+	{
+		"KnockbackMaxVel"	"50"
+		"KnockbackScale"	"0.01"
+		"KillPush"			"0"
+	}
+
+	"z147102" // Balrog
+	{
+		"KnockbackMaxVel"	"50"
+		"KnockbackScale"	"0.01"
+		"KillPush"			"0"
+	}
+
+	"z144572" // Titan
+	{
+		"KnockbackMaxVel"	"50"
+		"KnockbackScale"	"0.01"
+		"KillPush"			"0"
+	}
+
+	"z144536" // Pyramid Head
+	{
+		"KnockbackMaxVel"	"50"
+		"KnockbackScale"	"0.01"
+		"KillPush"			"0"
+	}
+
+	"z146285" // Zombie Dog
+	{
+		"KnockbackMaxVel"	"50"
+		"KnockbackScale"	"0.01"
+		"KillPush"			"0"
+	}
+
+
+	"h144513" // Juggernaut
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
+
+	"h146285" // Human Dog
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
+
+	"h100001" // VIP
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
+}
diff --git a/DamageProxy/configs/damageproxy/ze_pirates_port_royal_v3_6.cfg b/DamageProxy/configs/damageproxy/ze_pirates_port_royal_v3_6.cfg
new file mode 100644
index 00000000..b89cdb45
--- /dev/null
+++ b/DamageProxy/configs/damageproxy/ze_pirates_port_royal_v3_6.cfg
@@ -0,0 +1,8 @@
+"items"
+{
+	"z7560944" // Barbossa
+	{
+		"KnockbackMaxVel"	"250"
+		"KnockbackScale"	"0.50"
+	}
+}
diff --git a/DamageProxy/configs/damageproxy/ze_tesv_skyrim_v4fix.cfg b/DamageProxy/configs/damageproxy/ze_tesv_skyrim_v4fix.cfg
index 53fd59b2..576c7443 100644
--- a/DamageProxy/configs/damageproxy/ze_tesv_skyrim_v4fix.cfg
+++ b/DamageProxy/configs/damageproxy/ze_tesv_skyrim_v4fix.cfg
@@ -1,33 +1,58 @@
 "items"
 {
-	"1551382" // Werewolf
+	"z1551382" // Werewolf
 	{
-		"KnockbackMaxVel"	"500"
-		"KnockbackScale"	"0.40"
-		"NoSlowDown"		"0"
-		"KillPush"			"1"
-
-		"ww_push"			"1"
-		"ww_push2"			"1"
-		"ww_push3"			"1"
-		"ww_push4"			"1"
+		"KnockbackMaxVel"	"150"
+		"KnockbackScale"	"0.25"
 	}
 
-	"1551093" // Troll
+	"z1551093" // Troll
 	{
-		"KnockbackMaxVel"	"250"
-		"KnockbackScale"	"0.33"
+		"KnockbackMaxVel"	"150"
+		"KnockbackScale"	"0.25"
 	}
 
-	"1551122" // Giant
+	"z1551122" // Giant
 	{
-		"KnockbackMaxVel"	"200"
-		"KnockbackScale"	"0.33"
-	}
-
-	"1551162" // Dragonpriest
-	{
-		"KnockbackMaxVel"	"100"
+		"KnockbackMaxVel"	"150"
 		"KnockbackScale"	"0.20"
 	}
+
+	"z1551162" // Dragonpriest
+	{
+		"KnockbackMaxVel"	"25"
+		"KnockbackScale"	"0.05"
+		"KillPush"			"0"
+	}
+
+
+	"h7919" // Nightingale
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
+
+	"h6176" // Healmage
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
+
+	"h6158" // Dovahkin
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
+
+	"h6272" // Archmage
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
+
+	"h6137" // Daedric
+	{
+		"NoSlowDown"		"1"
+		"KillPush"			"0"
+	}
 }
diff --git a/DamageProxy/scripting/DamageProxy.sp b/DamageProxy/scripting/DamageProxy.sp
index 1c5d574f..0417b06b 100644
--- a/DamageProxy/scripting/DamageProxy.sp
+++ b/DamageProxy/scripting/DamageProxy.sp
@@ -90,7 +90,6 @@ public void OnMapStart()
 		return;
 
 	/* Late Load */
-	PrintToChatAll("late!");
 	for(int client = 1; client <= MaxClients; client++)
 	{
 		if(!IsClientInGame(client))
@@ -133,8 +132,10 @@ public void OnWeaponEquipped(int client, int entity)
 	if(!iHammerID)
 		return;
 
-	char sHammerID[16];
-	IntToString(iHammerID, sHammerID, sizeof(sHammerID));
+	char sHammerID[16] = "z";
+	if(ZR_IsClientHuman(client))
+		sHammerID[0] = 'h';
+	IntToString(iHammerID, sHammerID[1], sizeof(sHammerID) - 1);
 
 	g_Config.Rewind();
 	if(!g_Config.JumpToKey(sHammerID))
@@ -270,6 +271,7 @@ public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &dam
 	if(g_bNoSlowdown[client])
 		flVelocityModifier = GetEntDataFloat(client, g_hVelocityModifier);
 
+	damagetype |= DMG_DROWN;
 	SDKHooks_TakeDamage(victim, inflictor, attacker, damage, damagetype, weapon, damageForce, damagePosition, 1);
 
 	if(g_bNoSlowdown[client] && flVelocityModifier >= 0.99)