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 строка 652
653 {
654
655
656
657 float prot = 1 - protection;
658
659 float transf;
660
662 {
664 }
665 else if( inject_type ==
InjectTypes.ITEM_TO_PLAYER )
666 {
668 }
669 else if( inject_type ==
InjectTypes.PLAYER_AIR_PLAYER )
670 {
672 }
673 #ifdef DEVELOPER
674
675 #endif
676
677 bool dice = Math.RandomFloat01() < (prot * transf);
678
679
680 return dice;
681 }
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().