DayZ 1.30
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 строка 523

524 {
525 float count = CalculateAgentsToTransmit(agent, protection, dose_size, inject_type);
526 {
527 if(count > 0)
528 {
529 target.InsertAgent(agent, count);
530 return count;
531 }
532 }
533 return 0;
534 }
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:614

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

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