NikolaiVChr / flightgear-saab-ja-37-viggen

Saab 37 Viggen for Flightgear flight simulator
http://wiki.flightgear.org/Saab_37_Viggen
GNU General Public License v2.0
26 stars 15 forks source link

MP properties to be preserved #84

Closed colingeniet closed 4 years ago

colingeniet commented 4 years ago

I am trying to do some simplifications in the MP properties used (mostly by using booleans), and I noticed that some are also used by other aircrafts for e.g. the missile code. Thus I want to make sure I don't mess up with anything important.

Looking at the code, it seems the following are used or intended to be used in the armament code:

sim/hitches/aerotow/open           = ecm jammer on (nil/0 = off, 1 = on)
rotors/main/blade[3]/position-deg  = chaff
rotors/main/blade[0]/flap-deg      = MP missiles lat
rotors/main/blade[1]/flap-deg      = MP missiles lon
rotors/main/blade[2]/flap-deg      = MP missiles alt
rotors/main/blade[3]/flap-deg      = flares
sim/multiplay/generic/int[2]       = something to do with the radar

Anything else I need to be careful with ?

NikolaiVChr commented 4 years ago

int[2] is 1 if radar is not active.

blade 0 to 2 is for seeing MP missiles over MP, we dont really use that system anymore. So you dont have to be careful around those.

ECM jammer is not used, scrap that too.

Don't use up all bools please, we need some for future ECM and other stuff.

colingeniet commented 4 years ago

I will not use more than ~15 bools, there will be plenty remaining. Would you like me to keep a particular range of bools free for future use with other aircrafts ?

NikolaiVChr commented 4 years ago

Since we haven't agreed on any of them yet I think not.

I have been thinking about doing a MP property overhaul, pretty much start from scratch and use them much more efficient with the new 2017+ protocol, but I never got around to do it. Great that you are looking into this.

Just remember that floats are interpolated in time over MP sadly. So if its 3.0 and you set it to 10, its going to rise to 10, not switch to 10. Might effect some animation types.

colingeniet commented 4 years ago

I did not know that about floats, but I am only changing ints to bools, so it should not matter. Thank you for the answers.