MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Update

Method Update

ogsr_engine/xr_3da/motion.cpp:158–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156 Set((float)M->FrameStart(), (float)M->FrameEnd(), M->FPS());
157}
158void SAnimParams::Update(float dt, float speed, bool loop)
159{
160 if (!bPlay)
161 return;
162 bWrapped = false;
163 t_current += speed * dt;
164 if (t_current > max_t)
165 {
166 bWrapped = true;
167 if (loop)
168 {
169 float len = max_t - min_t;
170 float k = float(iFloor((t_current - min_t) / len));
171 t_current = t_current - k * len;
172 }
173 else
174 t_current = max_t;
175 }
176}
177
178//------------------------------------------------------------------------------

Callers 4

load_draw_internalMethod · 0.45
ProcessCamMethod · 0.45
net_StopMethod · 0.45
OnFrameMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected