From 64428b54efa0aa6fc4d016215ef881293ec03094 Mon Sep 17 00:00:00 2001 From: icedream Date: Wed, 25 Dec 2013 18:48:01 +0100 Subject: [PATCH] Argh, deleted the wrong part. Related to #10. --- lua/weapons/disguiser/init.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lua/weapons/disguiser/init.lua b/lua/weapons/disguiser/init.lua index 67ab1eb..2d200f6 100644 --- a/lua/weapons/disguiser/init.lua +++ b/lua/weapons/disguiser/init.lua @@ -365,8 +365,17 @@ hook.Add("PlayerDeath", "Disguiser.ThirdPersonDeath", function(victim, inflictor dentity:Fire("enablemotion","",0) // Let the entity bleed wahahaha. I'm mad, ain't I? + local traceworld = {} + traceworld.start = victim:GetPos() + Vector(0, 0, 20) + traceworld.endpos = traceworld.start + (Vector(0,0,-1) * 8000) // aim max. 8000 units down + traceworld.filter = victim + local trw = util.TraceLine(traceworld) // Send the trace and get the results. + local edata = EffectData() + edata:SetStart(victim:GetPos() - physics:GetVelocity()) + edata:SetOrigin(victim:GetPos()) + edata:SetNormal(trw.Normal) + edata:SetEntity(dentity) util.Effect("BloodImpact", edata) - util.Decal("Splash.Large", trw.HitPos + trw.HitNormal, trw.HitPos - trw.HitNormal) // BOOOOM! local boomFx = ents.Create("env_explosion")