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

◆ CalculateAgentsToTransmit()

float PluginBase::CalculateAgentsToTransmit ( int agent_id,
float protection,
int dose_size,
int inject_type )
inlineprotected

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

383 {
384
385 //Debug.Log("protection: "+protection.ToString());
386 float prot = 1 - protection; //reverse the value (in config, the higher the value, the higher the protection: 0 - 1) so that we can easily interpolate between 0 and 1 by multiplication
387 //Debug.Log("prot: "+prot.ToString(), "Agents");
388 float transf;
389
390 if( inject_type == InjectTypes.PLAYER_TO_ITEM )
391 {
392 transf = GetAgentTransferabilityOut(agent_id);
393 }
394 else if( inject_type == InjectTypes.ITEM_TO_PLAYER )
395 {
396 transf = GetAgentTransferabilityIn(agent_id);
397 }
398 else if( inject_type == InjectTypes.PLAYER_AIR_PLAYER )
399 {
400 transf = GetAgentTransferabilityAirOut(agent_id);
401 }
402
403 //Debug.Log("transf: "+transf.ToString(), "Agents");
404 //float result = GetAgentInitialCount(agent_id) * prot * transf * dose_size;//final formula
405 float result = 1 * prot * transf * dose_size;//final formula
406 //result = Math.Ceil(result);
407 //Debug.Log("result: "+result.ToString(), "Agents");
408 return result;
409 }
InjectTypes
Определения PluginTransmissionAgents.c:2
float GetAgentTransferabilityAirOut(int agent_id)
Определения PluginTransmissionAgents.c:134
float GetAgentTransferabilityIn(int agent_id)
Определения PluginTransmissionAgents.c:79
float GetAgentTransferabilityOut(int agent_id)
Определения PluginTransmissionAgents.c:128

Перекрестные ссылки GetAgentTransferabilityAirOut(), GetAgentTransferabilityIn() и GetAgentTransferabilityOut().

Используется в InjectAgentsWithPlayerCount() и InjectAgentWithPlayerDose().