diff options
Diffstat (limited to 'gamemode/core/npc/sv_huntingspawner.lua')
| -rw-r--r-- | gamemode/core/npc/sv_huntingspawner.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gamemode/core/npc/sv_huntingspawner.lua b/gamemode/core/npc/sv_huntingspawner.lua index f6bf827..279d834 100644 --- a/gamemode/core/npc/sv_huntingspawner.lua +++ b/gamemode/core/npc/sv_huntingspawner.lua @@ -95,7 +95,10 @@ end) local external_drops = {} function o.RegisterDrops(npcname,tbl) - assert(external_drops[npcname] == nil, string.format("Tried to register 2 drop tables for the npc %q",npcname)) + if not external_drops[npcname] == nil then + MsgC(Color(255,255,0),"WARNING: Tried to register 2 drop tables for " .. npcname) + end + --assert(external_drops[npcname] == nil, string.format("Tried to register 2 drop tables for the npc %q",npcname)) external_drops[npcname] = tbl end @@ -111,7 +114,7 @@ hook.Add("OnNPCKilled","droplootforexnpcs",function(npc,attacker,inflictor) if rng < itemchance then local drop = itm.GetItemByName(itemname) print("Createing a drop of",drop) - track.CreateDroppedItem(drop, npc:GetPos() + Vector(math.random(20),math.random(20),20)) + track.DropItem(drop, npc:GetPos()) end end end) |
