From: <sv...@ww...> - 2005-10-16 23:21:16
|
Author: mkrose Date: 2005-10-16 16:21:08 -0700 (Sun, 16 Oct 2005) New Revision: 1658 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/F16/F16System.cpp trunk/CSP/CSPSim/Source/F16/F16System.h trunk/CSP/CSPSim/Tools/HID/Maps/aircraft-core.map Log: * Add events to test releasing the fuel tanks. These are mapped to SHIFT-q and CTRL-q. (Delete Data/Inputs/aircraft.hid to pick up the keymap changes.) Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1658 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-10-16 23:13:43 UTC (rev 1657) +++ trunk/CSP/CSPSim/CHANGES.current 2005-10-16 23:21:08 UTC (rev 1658) @@ -60,6 +60,10 @@ * Update f-16dj model to include nozzle animation. + * Add events to test releasing the fuel tanks. These are mapped to + SHIFT-q and CTRL-q. (Delete Data/Inputs/aircraft.hid to pick up + the keymap changes.) + 2005-10-15: onsight * Refactor rotation animation classes, moving some common operations to the base class. Add an optional non-linear gain to the rotation Modified: trunk/CSP/CSPSim/Source/F16/F16System.cpp =================================================================== --- trunk/CSP/CSPSim/Source/F16/F16System.cpp 2005-10-16 23:13:43 UTC (rev 1657) +++ trunk/CSP/CSPSim/Source/F16/F16System.cpp 2005-10-16 23:21:08 UTC (rev 1658) @@ -157,6 +157,25 @@ } } +void F16System::onEjectCenterTank() { + // test jettison + StoresManagementSystem *sms = getModel()->getStoresManagementSystem().get(); // TODO should return a raw ptr + if (sms) { + sms->releaseStore(sms->getHardpointByName("HP5").child(0)); + // testing asymmetric loadouts + sms->releaseStore(sms->getHardpointByName("HP4").child(0)); + } +} + +void F16System::onEjectWingTanks() { + // test jettison + StoresManagementSystem *sms = getModel()->getStoresManagementSystem().get(); // TODO should return a raw ptr + if (sms) { + //sms->releaseStore(sms->getHardpointByName("HP4").child(0)); + sms->releaseStore(sms->getHardpointByName("HP6").child(0)); + } +} + void F16System::canopyToggle() { if (m_CanopySequence.valid()) { m_CanopySequence->play(); Modified: trunk/CSP/CSPSim/Source/F16/F16System.h =================================================================== --- trunk/CSP/CSPSim/Source/F16/F16System.h 2005-10-16 23:13:43 UTC (rev 1657) +++ trunk/CSP/CSPSim/Source/F16/F16System.h 2005-10-16 23:21:08 UTC (rev 1658) @@ -52,6 +52,8 @@ BIND_ACTION("FLAPS_UP", flapsUp); BIND_ACTION("FLAPS_TOGGLE", flapsToggle); BIND_ACTION("CANOPY_TOGGLE", canopyToggle); + BIND_ACTION("EJECT_WING_TANKS", onEjectWingTanks); + BIND_ACTION("EJECT_CENTER_TANK", onEjectCenterTank); END_INPUT_INTERFACE // protected: public: @@ -113,6 +115,10 @@ //std::vector<Steerpoint::Ref> m_Steerpoints; void onAirRefuelSwitch(); + // for testing only + void onEjectWingTanks(); + void onEjectCenterTank(); + void engageMPO(); void disengageMPO(); }; Modified: trunk/CSP/CSPSim/Tools/HID/Maps/aircraft-core.map =================================================================== --- trunk/CSP/CSPSim/Tools/HID/Maps/aircraft-core.map 2005-10-16 23:13:43 UTC (rev 1657) +++ trunk/CSP/CSPSim/Tools/HID/Maps/aircraft-core.map 2005-10-16 23:21:08 UTC (rev 1658) @@ -83,3 +83,7 @@ map key:SHIFT-CTRL-e press FUEL_QTY_SEL_CYCLE_NEXT map key:SHIFT-CTRL-o press EXT_FUEL_TRANS_TOGGLE map key:CTRL-e press ENGINE_FEED_CYCLE_NEXT + +map x36:SHIFT-q press EJECT_WING_TANKS +map x36:CTRL-q press EJECT_CENTER_TANK + |