aboutsummaryrefslogtreecommitdiff
path: root/gamemode/itemsystem/items/bow.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gamemode/itemsystem/items/bow.lua')
-rw-r--r--gamemode/itemsystem/items/bow.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/gamemode/itemsystem/items/bow.lua b/gamemode/itemsystem/items/bow.lua
index d87e446..3292ef6 100644
--- a/gamemode/itemsystem/items/bow.lua
+++ b/gamemode/itemsystem/items/bow.lua
@@ -47,9 +47,15 @@ arrow["speed"] = 13000
arrow["drop"] = 50
arrow["init"] = function(fb) end
arrow["onhit"] = function (self,data,phys)
- if(data.HitEntity and data.HitEntity.TakeDamage) then
+ print("Arrow hit ")
+ PrintTable(data.HitEntity)
+ if(data.Entity and data.Entity.TakeDamage) then
data.HitEntity:TakeDamage(25)
end
+
+ if(not data.HitNonWorld) then
+ SpawnWSItem("Arrow",data.HitPos)
+ end
self:Remove()
end