MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / _onDeactivate

Method _onDeactivate

Engine/source/sfx/sfxState.cpp:264–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262//-----------------------------------------------------------------------------
263
264void SFXState::_onDeactivate()
265{
266 #ifdef DEBUG_SPEW
267 Platform::outputDebugString( "[SFXState] Deactivating '%s'", getName() );
268 #endif
269
270 onDeactivate_callback();
271
272 // Remove the state from the list.
273
274 for( U32 i = 0; i < sgActiveStates.size(); ++ i )
275 if( sgActiveStates[ i ] == this )
276 {
277 sgActiveStates.erase_fast( i );
278 break;
279 }
280
281 // Deactivate included states.
282
283 for( U32 i = 0; i < MaxIncludedStates; ++ i )
284 if( mIncludedStates[ i ] )
285 mIncludedStates[ i ]->deactivate();
286
287 // Enable excluded states.
288
289 for( U32 i = 0; i < MaxExcludedStates; ++ i )
290 if( mExcludedStates[ i ] )
291 mExcludedStates[ i ]->enable();
292}
293
294//=============================================================================
295// Console Methods.

Callers

nothing calls this directly

Calls 5

erase_fastMethod · 0.80
getNameFunction · 0.50
sizeMethod · 0.45
deactivateMethod · 0.45
enableMethod · 0.45

Tested by

no test coverage detected