341 {
342 if (!agents)
343 return;
344
346 int highestBit =
Math.
Log2(agents) + 1;
347 for (int i = 0; i < highestBit; ++i)
348 {
349 int agent = (1 << i)& agents;
350 if (agent)
351 {
353 if (rndPct != 0)
354 quantity += quantity * rndPct;
355 m_Player.m_AgentPool.DigestAgent(agent, quantity);
356 }
357 }
358 }
int m_AgentTransferFilter
static const float STOMACH_DIGEST_AGENT_RANDOM_MIN
static const float STOMACH_DIGEST_AGENT_RANDOM_MAX
Percents of agents count <-1.0; 1.0>
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
static proto float Log2(float x)
Returns the binary (base-2) logarithm of x.