-------------------------------------------------------------------------------- Description: add the booster to the new ship --------------------------------------------------------------------------------
| 2648 | // add the booster to the new ship |
| 2649 | // -------------------------------------------------------------------------------- |
| 2650 | void EveSOF::SetupBoosters( EveShip2Ptr ship, const EveSOFDNAPtr dna ) const |
| 2651 | { |
| 2652 | CCP_STATS_ZONE( __FUNCTION__ ); |
| 2653 | |
| 2654 | // does this hull have boosters at all? |
| 2655 | if( dna->GetHullBoosterCount() == 0 ) |
| 2656 | { |
| 2657 | return; |
| 2658 | } |
| 2659 | |
| 2660 | // create |
| 2661 | EveBoosterSet2Ptr set; |
| 2662 | set.CreateInstance(); |
| 2663 | |
| 2664 | // per-race data |
| 2665 | const EveSOFDataMgr::RaceBoosterData* rdata = dna->GetRaceBoosterData(); |
| 2666 | // each booster is a locator with an index, keep track |
| 2667 | uint32_t boosterLocatorIndex = 0; |
| 2668 | // cycle over all hulls in the multi-hull list |
| 2669 | Vector3 hullOffset( 0.f, 0.f, 0.f ); |
| 2670 | for( size_t hullIdx = 0; hullIdx < dna->GetMultiHullCount(); ++hullIdx ) |
| 2671 | { |
| 2672 | // per-hull data |
| 2673 | const EveSOFDataMgr::HullBoosterData* hdata = dna->GetHullBoosterData( hullIdx ); |
| 2674 | |
| 2675 | // set the booster set's internal data |
| 2676 | set->SetData( |
| 2677 | rdata->glowScale, |
| 2678 | &rdata->glowColor, |
| 2679 | &rdata->warpGlowColor, |
| 2680 | rdata->symHaloScale, |
| 2681 | rdata->haloScaleX, |
| 2682 | rdata->haloScaleY, |
| 2683 | &rdata->haloColor, |
| 2684 | &rdata->warpHaloColor, |
| 2685 | hdata->alwaysOn ); |
| 2686 | set->SetLightData( rdata->lightOffset, rdata->lightFlickerAmplitude, rdata->lightFlickerFrequency, rdata->lightRadius, rdata->lightColor, rdata->lightWarpRadius, rdata->lightWarpColor ); |
| 2687 | |
| 2688 | Tr2EffectPtr effect = CreateBoosterEffect( rdata, BlueSharedString( "BOOSTER_LOD_HIGH" ) ); |
| 2689 | Tr2EffectPtr effectFar = CreateBoosterEffect( rdata, BlueSharedString( "BOOSTER_LOD_LOW" ) ); |
| 2690 | |
| 2691 | set->SetEffect( effect, effectFar ); |
| 2692 | |
| 2693 | // create and setup glows |
| 2694 | EveSpriteSetPtr glow; |
| 2695 | glow.CreateInstance(); |
| 2696 | |
| 2697 | Tr2EffectPtr glowEffect; |
| 2698 | glowEffect.CreateInstance(); |
| 2699 | glowEffect->StartUpdate(); |
| 2700 | glowEffect->SetEffectPathName( "res:/Graphics/Effect/Managed/Space/Booster/BoosterGlowAnimated.fx" ); |
| 2701 | glowEffect->AddResourceTexture2D( BlueSharedString( "NoiseMap" ), "res:/Texture/global/noise.dds" ); |
| 2702 | glowEffect->AddResourceTexture2D( BlueSharedString( "DiffuseMap" ), "res:/Texture/Particle/whitesharp.dds" ); |
| 2703 | // finish effect and set it |
| 2704 | glowEffect->EndUpdate(); |
| 2705 | glow->SetEffect( glowEffect ); |
| 2706 | set->SetGlow( glow ); |
| 2707 |
nothing calls this directly
no test coverage detected