5H1N0B11 / flightgear-mirage2000

GNU General Public License v3.0
20 stars 15 forks source link

A/A Missiles fire inconstantly. #130

Closed paccalin closed 3 years ago

paccalin commented 3 years ago

There is a bug on the current master branch preventing to release (/launch) A/A missiles in a consistant manner (sometimes blocked, sometimes it fires ...)

paccalin commented 3 years ago

According to @5H1N0B11 the radar changes in 0ce809825127cf54b6c92f62adedfa05d2a5e013 could be the source of the bug.

paccalin commented 3 years ago

In radar2.nas, the change of 0ce809825127cf54b6c92f62adedfa05d2a5e013 only affects:

I don't think any of these members nor this property is used for missile launch which makes me believe that this commit is not the cause of the bug.

5H1N0B11 commented 3 years ago

Corrected. The issue was coming from the radar, in the part that define the "type" (which is called by get_type). According to the bug I found the issue was only with f16 and mig28. Those 2 were in a hash, and the check was "is this hash != null" without checking the "type" of it (which was, for the mig28 and f16 AIR) and assigned a MARINE type (for AI boat). This resolution may help me to allow the mirage to display the hunter scenario