MCPcopy Create free account
hub / github.com/ddnet/ddnet / Create

Method Create

src/game/client/components/damageind.cpp:20–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20void CDamageInd::Create(vec2 Pos, vec2 Dir, float Alpha)
21{
22 if(m_NumItems >= MAX_ITEMS)
23 return;
24
25 CItem *pItem = &m_aItems[m_NumItems];
26 pItem->m_Pos = Pos;
27 pItem->m_Dir = -Dir;
28 pItem->m_RemainingLife = 0.75f;
29 pItem->m_StartAngle = -random_angle();
30 pItem->m_Color = ColorRGBA(1.0f, 1.0f, 1.0f, Alpha);
31 ++m_NumItems;
32}
33
34void CDamageInd::OnRender()
35{

Callers 1

DamageIndicatorMethod · 0.45

Calls 2

random_angleFunction · 0.85
ColorRGBAClass · 0.70

Tested by

no test coverage detected