SetColor also needs application of skin from player. Fixes #6 again.

master
Icedream 2013-12-21 20:49:53 +01:00
parent 91c4630abc
commit e895aff152
1 changed files with 4 additions and 1 deletions

View File

@ -348,9 +348,12 @@ hook.Add("PlayerDeath", "Disguiser.ThirdPersonDeath", function(victim, inflictor
// fake entity for spectacular death! // fake entity for spectacular death!
local dentity = ents.Create("prop_physics") local dentity = ents.Create("prop_physics")
dentity:SetModel(victim:GetModel()) dentity:SetModel(victim:GetModel())
if !!victim:GetSkin() then
dentity:SetSkin(victim:GetSkin())
end
dentity:SetColor(victim:GetColor())
dentity:SetAngles(victim:GetAngles()) dentity:SetAngles(victim:GetAngles())
dentity:SetPos(victim:GetPos()) dentity:SetPos(victim:GetPos())
dentity:SetColor(victim:GetColor())
dentity:SetVelocity(victim:GetVelocity()) dentity:SetVelocity(victim:GetVelocity())
local physics = victim:GetPhysicsObject() local physics = victim:GetPhysicsObject()
dentity:SetBloodColor(BLOOD_COLOR_RED) -- this thing was alive, ya know? :( dentity:SetBloodColor(BLOOD_COLOR_RED) -- this thing was alive, ya know? :(