Argh, deleted the wrong part. Related to #10.

master
Icedream 2013-12-25 18:48:01 +01:00
parent 744a73a3c3
commit 64428b54ef
1 changed files with 10 additions and 1 deletions

View File

@ -365,8 +365,17 @@ hook.Add("PlayerDeath", "Disguiser.ThirdPersonDeath", function(victim, inflictor
dentity:Fire("enablemotion","",0) dentity:Fire("enablemotion","",0)
// Let the entity bleed wahahaha. I'm mad, ain't I? // 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.Effect("BloodImpact", edata)
util.Decal("Splash.Large", trw.HitPos + trw.HitNormal, trw.HitPos - trw.HitNormal)
// BOOOOM! // BOOOOM!
local boomFx = ents.Create("env_explosion") local boomFx = ents.Create("env_explosion")