summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer/Plugins')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 6e39e6393..5550f0335 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -14,6 +14,7 @@ function Initialize(Plugin)
PluginManager = cRoot:Get():GetPluginManager()
PluginManager:AddHook(Plugin, cPluginManager.E_PLUGIN_BLOCK_PLACE)
+ PluginManager:AddHook(Plugin, cPluginManager.HOOK_TAKE_DAMAGE)
LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
return true
@@ -67,3 +68,13 @@ end
+
+function OnTakeDamage(Receiver, TDI)
+ -- Receiver is cPawn
+ -- TDI is TakeDamageInfo
+
+ LOG(Receiver:GetClass() .. " was dealt RawDamage " .. TDI.RawDamage .. ", FinalDamage " .. TDI.FinalDamage .. " (that is, " .. (TDI.RawDamage - TDI.FinalDamage) .. " HPs covered by armor)");
+end
+
+
+