Agent transmission chance processing.
- Аргументы
-
| agent_id | Id of agent (see eAgents enum) |
| protection | Protection size used for chance generation <0.0; 1.0> |
| inject_type | Type of transmission |
- Возвращает
- true if there is a chance to transmit agent
См. определение в файле PluginTransmissionAgents.c строка 571
572 {
573
574
575
576 float prot = 1 - protection;
577
578 float transf;
579
581 {
583 }
584 else if( inject_type ==
InjectTypes.ITEM_TO_PLAYER )
585 {
587 }
588 else if( inject_type ==
InjectTypes.PLAYER_AIR_PLAYER )
589 {
591 }
592 #ifdef DEVELOPER
593
594 #endif
595
596 bool dice = Math.RandomFloat01() < (prot * transf);
597
598
599 return dice;
600 }
float GetAgentTransferabilityAirOut(int agent_id)
Returns transferabilitAiryOut attribute for given agent.
float GetAgentTransferabilityIn(int agent_id)
Returns transferabilityIn attribute for given agent.
float GetAgentTransferabilityOut(int agent_id)
Returns transferabilityOut attribute for given agent.
Перекрестные ссылки GetAgentTransferabilityAirOut(), GetAgentTransferabilityIn(), GetAgentTransferabilityOut() и Math::RandomFloat01().
Используется в InjectAgentsWithPlayer().