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

Method UpdateSyncronous

trinity/Eve/Turret/EveTurretSet.cpp:1200–1313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1198}
1199
1200void EveTurretSet::UpdateSyncronous( const EveUpdateContext& updateContext, const Matrix* parentMatrix )
1201{
1202 float deltaT = updateContext.GetDeltaT();
1203 Be::Time time = updateContext.GetTime();
1204
1205 if( !m_singleTurrets.size() )
1206 {
1207 return;
1208 }
1209
1210 // LODing
1211 if( UpdateLOD( updateContext ) )
1212 {
1213 // LOD change, so just call ::InitializeGeometryResource(), takes care of everything
1214 InitializeGeometryResource();
1215
1216 // LOD change: toggle source dest effect of the attached firingFX
1217 if( m_firingEffect )
1218 {
1219 switch( m_lodLevel )
1220 {
1221 case LOD_DISABLED:
1222 case LOD_HIGHEST:
1223 m_firingEffect->SetDisplaySourceObject( true );
1224 break;
1225 default:
1226 m_firingEffect->SetDisplaySourceObject( false );
1227 break;
1228 }
1229 }
1230 }
1231
1232 if( IsUsingCMF( m_geometryResource ) )
1233 {
1234 for( auto& turret : m_singleTurrets )
1235 {
1236 // mesh animation
1237 if( turret.sequencer )
1238 {
1239 turret.sequencer->RemoveFinishedAnimations( Tr2Renderer::GetAnimationTime() );
1240 }
1241 }
1242 }
1243#if WITH_GRANNY
1244 else
1245 {
1246 for( const auto& turret : m_singleTurrets )
1247 {
1248 // mesh animation
1249 if( turret.grnModelInstance )
1250 {
1251 GrannySetModelClock( turret.grnModelInstance, Tr2Renderer::GetAnimationTime() );
1252 GrannyFreeCompletedModelControls( turret.grnModelInstance );
1253 }
1254 }
1255 }
1256#endif
1257

Callers

nothing calls this directly

Calls 12

IsUsingCMFFunction · 0.85
GetDeltaTMethod · 0.80
sizeMethod · 0.80
IsLoopingMethod · 0.80
UpdateSynchronousMethod · 0.80
GetTranslationMethod · 0.80
GetStartPositionMethod · 0.80
ifFunction · 0.50
GetTimeMethod · 0.45
GetLocatorMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected