MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / advanceTime

Method advanceTime

Engine/source/T3D/gameBase/std/stdGameProcess.cpp:119–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119bool StdClientProcessList::advanceTime( SimTime timeDelta )
120{
121 PROFILE_SCOPE( StdClientProcessList_AdvanceTime );
122
123 if ( doBacklogged( timeDelta ) )
124 return false;
125
126 bool ret = Parent::advanceTime( timeDelta );
127 ProcessObject *obj = NULL;
128
129 AssertFatal( mLastDelta >= 0.0f && mLastDelta <= 1.0f, "mLastDelta is not zero to one.");
130
131 obj = mHead.mProcessLink.next;
132 while ( obj != &mHead )
133 {
134 if ( obj->isTicking() )
135 obj->interpolateTick( mLastDelta );
136
137 obj = obj->mProcessLink.next;
138 }
139
140#ifdef TORQUE_EXPERIMENTAL_EC
141 for (U32 i = 0; i < UpdateInterface::all.size(); i++)
142 {
143 Component *comp = dynamic_cast<Component*>(UpdateInterface::all[i]);
144
145 if (!comp->isClientObject() || !comp->isActive())
146 continue;
147
148 UpdateInterface::all[i]->interpolateTick(mLastDelta);
149 }
150#endif
151
152 // Inform objects of total elapsed delta so they can advance
153 // client side animations.
154 F32 dt = F32(timeDelta) / 1000;
155
156 // Update camera FX.
157 gCamFXMgr.update( dt );
158
159 obj = mHead.mProcessLink.next;
160 while ( obj != &mHead )
161 {
162 obj->advanceTime( dt );
163 obj = obj->mProcessLink.next;
164 }
165
166#ifdef TORQUE_EXPERIMENTAL_EC
167 for (U32 i = 0; i < UpdateInterface::all.size(); i++)
168 {
169 Component *comp = dynamic_cast<Component*>(UpdateInterface::all[i]);
170
171 if (comp)
172 {
173 if (!comp->isClientObject() || !comp->isActive())
174 continue;
175 }
176

Callers

nothing calls this directly

Calls 7

advanceTimeFunction · 0.85
isTickingMethod · 0.80
isClientObjectMethod · 0.80
interpolateTickMethod · 0.45
sizeMethod · 0.45
isActiveMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected