DayZ 1.28
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 строка 453

454 {
455 float count = CalculateAgentsToTransmit(agent, protection, dose_size, inject_type);
456 {
457 if(count > 0)
458 {
459 target.InsertAgent(agent, count);
460 return count;
461 }
462 }
463 return 0;
464 }
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:516

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

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