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

Method run

ogsr_engine/xrGame/physics_game.cpp:55–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 virtual void run()
56 {
57 if (b_called)
58 return;
59
60 b_called = true;
61
62 CParticlesObject* ps = CParticlesObject::Create(ps_name, TRUE);
63 psLifeTime = ps->LifeTime();
64
65 Fmatrix pos;
66 pos.k.set(*((Fvector*)c.normal));
67 Fvector::generate_orthonormal_basis(pos.k, pos.j, pos.i);
68 pos.c.set(*((Fvector*)c.pos));
69
70 ps->UpdateParent(pos, {});
71 GamePersistent().ps_needtoplay.push_back(ps);
72
73 if (m_object && psLifeTime > 0)
74 remove_time = Device.dwTimeGlobal + iFloor(psLifeTime / 2.f);
75 };
76
77 virtual bool obsolete() const noexcept { return Device.dwTimeGlobal > remove_time; }
78

Callers

nothing calls this directly

Calls 6

CreateFunction · 0.85
LifeTimeMethod · 0.80
setMethod · 0.45
UpdateParentMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected