MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SelectThingEffect

Function SelectThingEffect

engine/Poseidon/World/Scene/Thing.cpp:702–716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

700}
701
702static const ThingEffectItem* SelectThingEffect(const ThingEffectItem* list, float value)
703{
704 // value 0..1
705 while (list->_probab >= 0)
706 {
707 value -= list->_probab;
708 if (value < 0)
709 {
710 return list;
711 }
712 list++;
713 }
714 Fail("No corresponding effect");
715 return nullptr;
716}
717
718Entity* CreateThingEffect(ThingEffectKind kind, // kind
719 Matrix4Val pos, Vector3Val vel // position and velocity

Callers 1

CreateThingEffectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected