I think FeatureShape is broken

I think FeatureShape is broken

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

I think FeatureShape is broken

Post by zwzsg »

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
Image




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
Image
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: I think FeatureShape is broken

Post by jK »

FeatureShape isn't the same as UnitShape ...

(so it doesn't bind the texture and iirc it doesn't transform the worldspace)
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: I think FeatureShape is broken

Post by zwzsg »

Why doesn't FeatureShape bind the texture? Why is FeatureShape not the same as UnitShape but for Feature? What is FeatureShape?

And from those pics and code it looks like the worldspace transformation is the same for FeatureShape and UnitShape.
Post Reply

Return to “Help & Bugs”