DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ InjectAgentsWithPlayerCount()

void PluginBase::InjectAgentsWithPlayerCount ( EntityAI target,
int agents,
float protection,
int dose_size,
int inject_type )
inlineprotected

will add agents to a given target, with no probability, but the dose size is modified by m_TransferabilityOut of the agent

См. определение в файле PluginTransmissionAgents.c строка 322

323 {
324 if(target && (agents != 0) && target.IsEntityAI() )
325 {
326 int bit_count = Math.GetNumberOfSetBits(agents);
327
328 for (int i = 0; i < bit_count; i++)
329 {
330 int agent_bit = Math.Pow(2,Math.GetNthBitSet(agents,i));
331 float count = CalculateAgentsToTransmit(agent_bit, protection, dose_size, inject_type);
332 target.InsertAgent(agent_bit,count);
333 }
334 }
335 }
float CalculateAgentsToTransmit(int agent_id, float protection, int dose_size, int inject_type)
Определения PluginTransmissionAgents.c:382

Перекрестные ссылки CalculateAgentsToTransmit(), Math::GetNthBitSet(), Math::GetNumberOfSetBits() и Math::Pow().

Используется в TransmitAgentsEx().