Page 1 of 1
[86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 08:27
by Google_Frog
In 85.0 maxAngleDif is the angle between the extremes of a weapon's arc. In 86.0 maxAngleDif is the maximum angle away from mainDir that a weapon can aim at. Effectively to update all values must be halved.
I added a unitdefs_posts fix in ZK as I'm waiting to see if the change is accidental or not. I didn't hear anything about it.
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 14:03
by Kloot
Now your gunships will
jam again.
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 14:33
by Google_Frog
So... explain what is going on. If I had to take a wild guess it would be that you effectively doubled all maxAngleDifs instead of telling us to increase the maxAngleDif for gunships that jam.
I tested this and my unitdefs_post change does not produce gunship weapon jamming if I also double the maxAngleDif of the jammable gunships.
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 15:29
by Beherith
Thanks for the heads up, ill go half the angles for notair.
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 15:30
by Kloot
The variable is called "maxMainDirAngleDif" internally. That implies it is not supposed to be "the angle between the extremes of a weapon's arc" (as in 85.0) but exactly "the maximum angle away from mainDir", which is how 86.0 interprets it during targetting checks.
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 15:38
by Google_Frog
I don't really care how the value is interpreted as long as no functionality is lost. The functionality is unchanged and I think the new interpretation makes a bit more sense, that is how I assumed it worked when I first encountered it. So this is a notification for moddevs and a check to see if the change was intentional.
Doubled gunship maxAngleDif fixes jamming in 86.0 which may be important to others as well.
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 18:10
by FLOZi
When did this change? Seems I documented it this way for the
Unitdefs wiki page, oddly - seen as I can't find any branch that doesn't default to 360

.
TBH it seems going all the way back
http://springrts.com/phpbb/viewtopic.php?f=12&t=4012
Gnomre wrote:The cone is defined with "MaxAngleDif1=Degrees;" so if you wanted the weapon to only fire in a 60 degree arc, you'd put MaxAngleDif1=60;
zwzsg wrote:A 90 degree forward cone would look like:
WeaponMainDir1=0 0 1;//x:0 y:0 z:1 => that's forward!
MaxAngleDif1=90;//90° from side to side, or 45° from center to each direction
Das Bruce wrote:Firstly thats 45 degrees either way, cut it in half.
there are conflicting interpretations of how it works (Though I'd take gnome, and zwzsg's word any day)
I prefer 'I want a 90 degree arc, I set the value to 90'. It's the way S44's arcs have been set since at least 2008. Why change it after 4-6 years?
If the internal name is a big deal, surely it makes more sense to change that and not break every single game that uses it, and a history of documentation (However muddled it is - I will correct the UnitDefs page).
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 18:45
by zwzsg
FLOZi wrote:If the internal name is a big deal, surely it makes more sense to change that and not break every single game that uses it, and a history of documentation (However muddled it is - I will correct the UnitDefs page).
Have you no respect for our customs? It's not a proper Spring release if it doesn't introduce a change breaking every single game! The more subtle the bug, the merrier.
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 19:01
by smoth
FLOZi wrote:
Gnomre wrote:The cone is defined with "MaxAngleDif1=Degrees;" so if you wanted the weapon to only fire in a 60 degree arc, you'd put MaxAngleDif1=60;
zwzsg wrote:A 90 degree forward cone would look like:
WeaponMainDir1=0 0 1;//x:0 y:0 z:1 => that's forward!
MaxAngleDif1=90;//90° from side to side, or 45° from center to each direction
Das Bruce wrote:Firstly thats 45 degrees either way, cut it in half.
there are conflicting interpretations of how it works (Though I'd take gnome, and zwzsg's word any day)
I prefer 'I want a 90 degree arc, I set the value to 90'. It's the way S44's arcs have been set since at least 2008. Why change it after 4-6 years?
If the internal name is a big deal, surely it makes more sense to change that and not break every single game that uses it, and a history of documentation (However muddled it is - I will correct the UnitDefs page).
wait, so my firearcs need to be adjusted? or it has been completely broken? I don't want to overreact but I really don't understand the change NOR will I have time to work on it. Sorry spring but my turtle is more important.
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 19:06
by FLOZi
85 is the same way it has always been.
Google reports that (current) 86.0 has doubled arcs in comparison.
Help me lobby-lobby-lobby to have the change reverted.
Lobby lobby badger badger rabble rabble.
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 20:11
by hoijui
+1 on having that change reverted.
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 20:16
by KingRaptor
I think it makes more sense the new way, and as far as breaking changes go it could have been a lot worse (this one can be fixed with 3 lines in unitdefs_post).
Documenting the change would have been nice though.
Re: [86.0] maxAngleDif effectively doubled
Posted: 27 Feb 2012, 21:27
by SanadaUjiosan
I vote to keep things as they were.
I personally loved that I could enter 180 and I knew exactly what it meant. So many things in Spring require little calculations to figure out what they really represent, it was nice to have something that wasn't like that

Re: [86.0] maxAngleDif effectively doubled
Posted: 28 Feb 2012, 00:54
by smoth
KingRaptor wrote:I think it makes more sense the new way, and as far as breaking changes go it could have been a lot worse (this one can be fixed with 3 lines in unitdefs_post).
I think it makes less sense. also, this would be fixing it with a kludge.
Is there an advantage to the change?
Re: [86.0] maxAngleDif effectively doubled
Posted: 28 Feb 2012, 01:48
by Forboding Angel
hoijui wrote:+1 on having that change reverted.
+1 on your +1
Re: [86.0] maxAngleDif effectively doubled
Posted: 28 Feb 2012, 08:14
by FLOZi
Re: [86.0] maxAngleDif effectively doubled
Posted: 28 Feb 2012, 08:21
by Google_Frog
I couldn't care less and would prefer fixes for things that cannot be simply worked around. Such as the shield graphics.
Re: [86.0] maxAngleDif effectively doubled
Posted: 28 Feb 2012, 18:41
by KDR_11k
Good. If the internal name doesn't reflect the external behaviour then the name has to be changed, not the behaviour.