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.
Couple of bugs
Moderators: Moderators, Content Developer
-
- Posts: 843
- Joined: 13 Aug 2007, 13:19
Couple of bugs
Last edited by klapmongool on 17 Apr 2014, 11:57, edited 1 time in total.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Couple of bugs
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.
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.
Re: Couple of bugs
:o I don't even recall what this is.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
-
- Posts: 843
- Joined: 13 Aug 2007, 13:19
Re: Couple of bugs
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?
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?
Re: Couple of bugs
You're not ZK, you can use armor classes :)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).
Re: Couple of bugs
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
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
Re: Couple of bugs
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?
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?
Re: Couple of bugs
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.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
3) is reserved for zk it seems
Re: Couple of bugs
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)
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)
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.