Code: Select all
function gadget:DrawWorldPreUnit()
if SYNCED.ColorWars then
gl.DepthTest(true)
gl.DepthMask(true)
for _,b in sipairs(SYNCED.ColorWars.FullBlocks) do
gl.Translate(b.x,b.y,b.z)
gl.FeatureShape(FeatureDefNames.colorwarsquad.id,b.team)
gl.Translate(-b.x,-b.y,-b.z)
end
gl.DepthMask(false)
gl.DepthTest(false)
end
end

Code: Select all
function gadget:DrawWorldPreUnit()
if SYNCED.ColorWars then
gl.DepthTest(true)
gl.DepthMask(true)
for _,b in sipairs(SYNCED.ColorWars.FullBlocks) do
gl.Translate(b.x,b.y,b.z)
gl.UnitShape(UnitDefNames.colorwarsquad.id,b.team)
gl.Translate(-b.x,-b.y,-b.z)
end
gl.DepthMask(false)
gl.DepthTest(false)
end
end
