MCPcopy Create free account
hub / github.com/carbonengine/trinity / RebuildBoosterSet

Method RebuildBoosterSet

trinity/Eve/SpaceObject/EveShip2.cpp:234–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void EveShip2::RebuildBoosterSet()
235{
236 if( !m_boosters )
237 {
238 return;
239 }
240
241 m_boosters->Clear();
242
243 static const char* kLocatorPrefix = "locator_booster";
244 const unsigned int kLocatorPrefixLength = (unsigned int)strlen( kLocatorPrefix );
245
246 unsigned int n = (unsigned int)m_locators.size();
247 for( unsigned int i = 0; i < n; ++i )
248 {
249 EveLocator2Ptr locator = m_locators[i];
250 const char* locatorName = locator->GetName();
251 if( strncmp( locatorName, kLocatorPrefix, kLocatorPrefixLength ) == 0 )
252 {
253 Vector4 functionality( 0.f, 1.f, 1.f, 1.f );
254 m_boosters->Add( &locator->GetTransform(), &functionality, true, 0, 0 );
255 }
256 }
257
258 m_boosters->PrepareResources();
259}
260
261bool EveShip2::Initialize()
262{

Callers

nothing calls this directly

Calls 6

sizeMethod · 0.80
PrepareResourcesMethod · 0.80
ClearMethod · 0.45
GetNameMethod · 0.45
AddMethod · 0.45
GetTransformMethod · 0.45

Tested by

no test coverage detected