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

Method LoadActions

ogsr_engine/xrParticles/particle_manager.cpp:284–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284u32 CParticleManager::LoadActions(int alist_id, IReader& R, bool copFormat)
285{
286 // Execute the specified action list.
287 ParticleActions* pa = GetActionListPtr(alist_id);
288 VERIFY(pa);
289
290 std::scoped_lock m{pa->m_bLocked};
291
292 pa->clear();
293 if (R.length())
294 {
295 u32 cnt = R.r_u32();
296 for (u32 k = 0; k < cnt; k++)
297 {
298 u32 type = R.r_u32();
299 if (type == (u32)-1)
300 continue;
301
302 ParticleAction* act = CreateAction((PActionEnum)type);
303 act->m_copFormat = copFormat;
304 act->Load(R);
305 pa->append(act);
306 }
307 }
308 return pa->size();
309}

Callers 1

CompileMethod · 0.80

Calls 6

clearMethod · 0.45
lengthMethod · 0.45
r_u32Method · 0.45
LoadMethod · 0.45
appendMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected