aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/combat/cl_damage.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/core/combat/cl_damage.lua')
-rw-r--r--gamemode/core/combat/cl_damage.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/gamemode/core/combat/cl_damage.lua b/gamemode/core/combat/cl_damage.lua
index 5059588..a45cb72 100644
--- a/gamemode/core/combat/cl_damage.lua
+++ b/gamemode/core/combat/cl_damage.lua
@@ -3,11 +3,12 @@
local drawables = {}
net.Receive("art_damage_ent",function()
- print("Notified of damage")
+ --print("Notified of damage")
local who = net.ReadEntity()
local dmg = net.ReadDouble()
--A random vector in the entity
+ if not IsValid(who) then return end
local aa,bb = who:WorldSpaceAABB()
local mr = math.random
local rx,ry,rz = mr(aa.x,bb.x),mr(aa.y,bb.y),mr(aa.z,bb.z)