Improve mining alternate mode for nodes

master
E. Almqvist 5 years ago
parent 8132e35e2e
commit d70ccb4c27
  1. 6
      gamemode/engine/lib/sh_node.lua

@ -160,7 +160,11 @@ if SERVER then
Quantum.Notify.ItemGathered( pl, itemTbl, amount ) Quantum.Notify.ItemGathered( pl, itemTbl, amount )
else else
local basepos = ent:GetPos() local basepos = ent:GetPos()
Quantum.Server.Item.SpawnItem( basepos, loot, amount ) -- calculate the entities collision bounds height
local p, q = ent:GetCollisionBounds() -- Z is the height
local height = q.z - p.z
Quantum.Server.Item.SpawnItem( basepos + Vector(0, 0, height), loot, amount )
end end
else else
return return

Loading…
Cancel
Save