Skip to content

Commit

Permalink
F-15: Ensure missile selection status updated when changed; Fixes #12
Browse files Browse the repository at this point in the history
The bindings on the throttle were correct; in that the selector needs to be changed and a weapons system refresh requested. Fix this by adding a listener to the property to always do this rather than relying on inline code.
  • Loading branch information
Zaretto committed Mar 19, 2016
1 parent c1cc5fb commit a0d51db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions aircraft/F-15/Models/Cockpit/Instruments/left-side-panel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -839,12 +839,6 @@
<wrap>false</wrap>
</binding>
</action>
<release>
<binding>
<command>nasal</command>
<script>aircraft.arm_selector(); aircraft.demand_weapons_refresh();</script>
</binding>
</release>
</animation>

<animation>
Expand Down
6 changes: 6 additions & 0 deletions aircraft/F-15/Nasal/weapons.nas
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ var sel_missile_count = 0;

aircraft.data.add( WeaponSelector, ArmSwitch );

setlistener("sim/model/f15/controls/armament/weapon-selector", func(v)
{
aircraft.arm_selector();
aircraft.demand_weapons_refresh();
});


# Init
var weapons_init = func()
Expand Down

0 comments on commit a0d51db

Please sign in to comment.