Added TakeDamage logging to the Debuggers plugin.
http://forum.mc-server.org/showthread.php?tid=625&pid=5720#pid5720 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1089 0a769ca7-a7f5-676a-18bf-c427514a06d6master
parent
65aa72a2c3
commit
999014170d
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue