aboutsummaryrefslogtreecommitdiff
path: root/entities
diff options
context:
space:
mode:
Diffstat (limited to 'entities')
-rw-r--r--entities/entities/art_droppeditem/init.lua4
-rw-r--r--entities/weapons/hands.lua2
2 files changed, 4 insertions, 2 deletions
diff --git a/entities/entities/art_droppeditem/init.lua b/entities/entities/art_droppeditem/init.lua
index afd3139..6c66ac8 100644
--- a/entities/entities/art_droppeditem/init.lua
+++ b/entities/entities/art_droppeditem/init.lua
@@ -67,7 +67,9 @@ net.Receive("art_requestpickup",function(len,pl)
xpcall(function()
pl:GiveItem(i)
e:Remove()
- end,function() --We couldn't put the item in the player's inventory!
+ end,function()
+ print("Unable to put item into player's inventory")
+ --We couldn't put the item in the player's inventory!
--Don't do anything I guess
end)
else
diff --git a/entities/weapons/hands.lua b/entities/weapons/hands.lua
index 553c4f1..57c56d9 100644
--- a/entities/weapons/hands.lua
+++ b/entities/weapons/hands.lua
@@ -39,7 +39,7 @@ function SWEP:DefaultPickup()
if self.Pickup == nil then
local tr = self.Owner:GetEyeTrace()
local dist = self.Owner:GetPos():Distance(tr.HitPos)
- if dist < 100 and tr.Entity:GetMass() < 100 then
+ if dist < 100 and tr.Entity.GetMass and tr.Entity:GetMass() < 100 then
self.Pickup = tr.Entity
self.PickupAngles = tr.Entity:GetAngles()
self.PickupOffset = dist