From 0eb3877430cd329358580de89ae99475111d734d Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Mon, 7 Mar 2016 19:29:26 -0500 Subject: Bugfix in arrow that caused it to never dammage entities --- gamemode/itemsystem/items/bow.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2