Couple of bugs

Couple of bugs

Old Evo threads before move to own site

Moderators: Moderators, Content Developer

Locked
klapmongool
Posts: 843
Joined: 13 Aug 2007, 13:19

Couple of bugs

Post by klapmongool »

1. Fighters can kill air factories because they aim at an air unit that is being built.

2. The blue graphic for adv generators that are positioned on the very edge of the map wont display properly. The graphic displays completely on the map instead of cutting off at the edge. Check it out ingame, it is easy to see.
Last edited by klapmongool on 17 Apr 2014, 11:57, edited 1 time in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Couple of bugs

Post by Forboding Angel »

1. Spring issue. Not much i can do about it unless spring has some way to tell aircraft that they can't shoot other aircraft that are being built (afaik this doesn't exist atm).

2. Yeah I know. I blame zwzsg :-) That said, the graphic does not exceed the blue circle, it just looks weird. I'll see if I can get z to switch it up. I've already looked and that code is beyond my understanding.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Couple of bugs

Post by zwzsg »

:o I don't even recall what this is.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Couple of bugs

Post by Forboding Angel »

klapmongool
Posts: 843
Joined: 13 Aug 2007, 13:19

Re: Couple of bugs

Post by klapmongool »

Ok.

About the fighters: It seems they hit the air factory because it is in the way of the air unit being built. If the unit would be 'on top' instead of 'in' the factory it would not kill the lab probably?
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Couple of bugs

Post by Anarchid »

1. Spring issue. Not much i can do about it unless spring has some way to tell aircraft that they can't shoot other aircraft that are being built (afaik this doesn't exist atm).
You're not ZK, you can use armor classes :)
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Couple of bugs

Post by knorke »

1) Spring.SetUnitNeutral = unit does not get targeted by enemies anymore

In case players manualy targeting unfinished aircrafts: Block such orders with AllowCommand()

To make fighters deal less* damage vs factories: armor classes
(*think 1 is minimum)

To make fighters deal zero damage vs factories: UnitPreDamaged
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Couple of bugs

Post by knorke »

2)Maybe coordinates in this gets clamped to mapborder:
gl.DrawGroundQuad(x-xs,z-zs,x+xs,z+zs,false,0,0,1,1)
For example placing a building a left mapedge:
x=near 0
xs=100 (or whatever size the decal is)
So because of the clamping it gets drawn with 0 instead of -100.
Since only one part of the x or z coordinate pairs ever gets clamped, the texture appears stretched?
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Couple of bugs

Post by Jools »

knorke [numbering added] wrote:1) Spring.SetUnitNeutral = unit does not get targeted by enemies anymore

2) In case players manualy targeting unfinished aircrafts: Block such orders with AllowCommand()

3) To make fighters deal less* damage vs factories: armor classes
(*think 1 is minimum)

4) To make fighters deal zero damage vs factories: UnitPreDamaged
I think options 1) and 4) are best. 2) is problematic because then you have the interface say one thing and the resulting action being something else. We need less of this in spring, not more.

3) is reserved for zk it seems ;)
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Couple of bugs

Post by zwzsg »

Right, I coded it for you some times ago.

If it fails on the edge of the map, I suppose it's because gl.DrawGroundQuad doesn't like map edges. So I guess you could replace

Code: Select all

gl.DrawGroundQuad(x-xs,z-zs,x+xs,z+zs,false,0,0,1,1)
by something such as:

Code: Select all

gl.BeginEnd(GL.QUADS,
	function()
		local v=function(x,z,u,v)
			gl.TexCoord(u,v)
			gl.Vertex(x,Spring.GetGroundHeight(math.max(0,math.min(Game.mapSizeX,x)),math.max(0,math.min(Game.mapSizeZ,z))),z)
		end
		v(x-xs,z-zs,0,0)
		v(x-xs,z+zs,0,1)
		v(x+xs,z+zs,1,1)
		v(x+xs,z-zs,1,0)
	end)
Of course it would cause massive tearing as textures fight for the depth buffer, which must be fixed by a judicious use of gl.PolygonOffset.

And if you find textures floating half-way out of map ugly, then you have to limit the x and z to map dimension, and cut exactly as much in the texture coordinate space.
Locked

Return to “Evolution RTS”