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

◆ InjectAgentWithPlayerDose()

float PluginBase::InjectAgentWithPlayerDose ( EntityAI target,
int agent,
float protection,
float dose_size,
int inject_type )
inlineprotected

Injects agent to a given target.

Аргументы
targetEntity to inject agents to
agentsBit mask with information about agents
protectionProtection size used for chance generation <0.0; 1.0>
dose_sizeNumber of agents to be transmitted
inject_typeType of transmission
Возвращает
count Number of injected agents (dose_size might be shrinked by chance from protection)

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

471 {
472 float count = CalculateAgentsToTransmit(agent, protection, dose_size, inject_type);
473 {
474 if(count > 0)
475 {
476 target.InsertAgent(agent, count);
477 return count;
478 }
479 }
480 return 0;
481 }
float CalculateAgentsToTransmit(int agent_id, float protection, int dose_size, int inject_type)
Calculates number of agents that can be transmitted (based on given dose_size)
Определения PluginTransmissionAgents.c:533

Перекрестные ссылки CalculateAgentsToTransmit().

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