Page 2 of 3

Re: Onlytargetcategory being ignored

Posted: 07 Feb 2012, 18:25
by Senna
smoth wrote:target category is not done on a weapon level it is done on a unit level senna. You need to name the units in question
toairweapon= 1, its set on weapon and target VTOL , even forcing the onlytargetcategory to land it will not shot on land units, cuz weapon has values over unit fbi

Re: Onlytargetcategory being ignored

Posted: 07 Feb 2012, 19:55
by smoth
ToAir weapon has been deprecated, does any project even use it?

Re: Onlytargetcategory being ignored

Posted: 07 Feb 2012, 19:57
by Beherith
Yeah ba used it, but its fixed in svn.

Re: Onlytargetcategory being ignored

Posted: 07 Feb 2012, 21:29
by smoth
good, that tag needed to go.

still left with:
Senna wrote:Did u tested that torpedo, ignores categorys? because ive tested them, and seems like torpedos keeps ignoring the forcing onlytargetcategory, or maybe a missing command in torpedo wich i didnt found on wiki
Again, name the units.

Re: Onlytargetcategory being ignored

Posted: 07 Feb 2012, 21:35
by knorke
smoth wrote:target category is not done on a weapon level it is done on a unit level senna. You need to name the units in question
what? onlyTargetCategory is per weapon, how else would you have, say a unit with one anti-ground weapon and one anti-air weapon.
http://springrts.com/wiki/Units-UnitDefs

Re: Onlytargetcategory being ignored

Posted: 07 Feb 2012, 22:23
by SanadaUjiosan
I think he means it is in the unit def, not the weapon def.

Re: Onlytargetcategory being ignored

Posted: 07 Feb 2012, 23:03
by smoth
SanadaUjiosan wrote:I think he means it is in the unit def, not the weapon def.

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 00:48
by Forboding Angel
smoth wrote:good, that tag needed to go.
toairweapon was necessary because it did not allow AA units to be fpsed and then force fired at anything the controller wanted. Tag has been replaced with.... ehh lemmie look it up...

canAttackGround = false,

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 01:14
by smoth
canattackground determines if a weapon can be force fired at the ground forb.

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 06:51
by Forboding Angel
Yes I know... You weren't listening. The main feature of toairweapon was that it made fps firing of weapons at ground and ground units impossible. Yes it did only target category vtol too, but that wasn't the reason to use toairweapon, it was the fps fire lock.

People who previously made use of toairweapon need to know to replace it with canattackground

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 11:25
by smoth
that doesn't make any sense.

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 13:30
by CarRepairer
Forb is right. I will try to explain using a list.

Toairweapon did two things:
1) make onlytargetcategory=flying units
2) make canattackground=false

Both those defs are available separately now, so toairweapon is not needed.

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 13:33
by smoth
I know what it did, I was saying that his statement about the FPS stuff being the "main point"

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 13:58
by Senna
knorke wrote:
smoth wrote:target category is not done on a weapon level it is done on a unit level senna. You need to name the units in question
what? onlyTargetCategory is per weapon, how else would you have, say a unit with one anti-ground weapon and one anti-air weapon.
http://springrts.com/wiki/Units-UnitDefs
yeah it has no sense, but its an esample to smoth

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 15:51
by FLOZi
CarRepairer wrote:Forb is right. I will try to explain using a list.

Toairweapon did two things:
1) make onlytargetcategory=flying units
2) make canattackground=false

Both those defs are available separately now, so toairweapon is not needed.
btw, looking at the commit that removed toairweapon, and noting the lack of results from grepping the source otherwise, I'm not sure if toairweapon doing part 2 hasn't been gone for some time.

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 15:56
by smoth
lol, glad I never used it :P.

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 16:37
by Kloot
FYI, toAirWeapon has never had anything to do with canAttackGround between the latter's introduction (github.com/spring/spring/commit/4f00af09a8ca6978cdb30e2d00521bee9aec0d7a for 0.75b1) and the former's removal.

(this here be a fine example of conflation, like the persistent "negative sun directions caused crashes" claim...)

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 16:41
by smoth
Kloot wrote:FYI, toAirWeapon has never had anything to do with canAttackGround between the latter's introduction (github.com/spring/spring/commit/4f00af09a8ca6978cdb30e2d00521bee9aec0d7a for 0.75b1) and the former's removal.
Image
(this here be a fine example of conflation, like the persistent "negative sun directions caused crashes" claim...)
How I read the post

thanks for clearing that up Kloot. What about the fps thing forb is talking about

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 18:11
by Kloot
I got no clue, but let's analyze it.
"The main feature of toairweapon was that it made fps firing of weapons at ground and ground units impossible."
Now given what toAirWeapon did (set a weapon's onlyTargetCategory to VTOL), it would have been true that "toAirWeapon made firing of weapons at ground units" impossible (if those units happened to be in a category other than VTOL, which would be expected), whether in FPS mode or not. I would not expect toAirWeapon=true to have also blocked "firing of weapons at ground", but looking at the code today that was probably true also: any weapon with a non-default onlyTargetCategory (or canAttackGround=false, for which a check was obviously added later) can not attack the ground, again whether in FPS mode or not.

So, this is what FA should have said:
"toAirWeapon=true made firing of weapons at ground and ground units with category=VTOL impossible. the more recent canAttackGround tag lifted the inability of such weapons to fire at ground."
(and toAirWeapon did not literally "make canAttackGround=false" as CR's post might lead to you believe, but it had the same effect before canAttackGround existed)

Re: Onlytargetcategory being ignored

Posted: 08 Feb 2012, 18:15
by smoth
Kloot wrote:any weapon with a non-default onlyTargetCategory (or canAttackGround=false, for which a check was obviously added later) can not attack the ground, again whether in FPS mode or not.
:shock: