bool equipCallback_ElCapitan(Career* career, float windAmbient, float windBlast, database::MissionInfo* missionInfo) { // equip best rig and canopy if( !equipBestBASEEquipment( career, windAmbient, windBlast ) ) return false; if( !equipBestSuit( career, windAmbient, windBlast ) ) return false; // set slider up and 36' pilotchute career->getVirtues()->equipment.sliderOption = ::soUp; career->getVirtues()->equipment.pilotchute = 5; return true; }
bool equipCallback_RoyalGorge_FieldTraining(Career* career, float windAmbient, float windBlast, database::MissionInfo* missionInfo) { // equip best rig and canopy if( !equipBestBASEEquipment( career, windAmbient, windBlast ) ) return false; // equip best suit if( !equipBestSuit( career, windAmbient, windBlast ) ) return false; // set slider up and 38' pilotchute career->getVirtues()->equipment.sliderOption = ::soUp; career->getVirtues()->equipment.pilotchute = 4; return true; }
bool equipBestBASEEquipment(Career* career, float windAmbient, float windBlast) { assert( career ); Virtues* virtues = career->getVirtues(); if (virtues->equipment.suit.type != gtSuit ) { if (!equipBestSuit(career, windAmbient, windBlast)) { if (!equipBestWingsuit(career, windAmbient, windBlast)) { return false; } } } // first, check if there is any BASE rig owned by player bool flag = false; if( ( virtues->equipment.rig.id >= 0) && (!database::Rig::getRecord( virtues->equipment.rig.id )->skydiving) ) { flag = true; } else { Gear gear; for( unsigned int i=0; i<career->getNumGears(); i++ ) { gear = career->getGear( i ); if( gear.type == gtRig ) { if( !database::Rig::getRecord( gear.id )->skydiving ) { flag = true; break; } } } } // if player has no BASE rig - fail immediately if( !flag ) return false; // second, check if there is any BASE canopy owned by player flag = false; if( ( virtues->equipment.canopy.id >= 0) && (!database::Canopy::getRecord( virtues->equipment.canopy.id )->skydiving) ) { flag = true; } else { Gear gear; for( unsigned int i=0; i<career->getNumGears(); i++ ) { gear = career->getGear( i ); if( gear.type == gtCanopy ) { if( !database::Canopy::getRecord( gear.id )->skydiving ) { flag = true; break; } } } } // if player has no BASE canopy - fail immediately if( !flag ) return false; // if current rig is BASE rig if( ( virtues->equipment.rig.id >= 0) && (!database::Rig::getRecord( virtues->equipment.rig.id )->skydiving) ) { // check rig state treshold if( virtues->equipment.rig.state < 0.75f ) { // equip best rig equipBestBASERig( career ); } } else { // equip best rig equipBestBASERig( career ); } // equip best canopy for specifiend weather equipBestBASECanopy( career, windAmbient, windBlast ); if (!equipBestHelmet(career)) { return false; } return true; }