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 строка 554
555 {
556
557
558
559 float prot = 1 - protection;
560
561 float transf;
562
564 {
566 }
567 else if( inject_type ==
InjectTypes.ITEM_TO_PLAYER )
568 {
570 }
571 else if( inject_type ==
InjectTypes.PLAYER_AIR_PLAYER )
572 {
574 }
575 #ifdef DEVELOPER
576
577 #endif
578
579 bool dice = Math.RandomFloat01() < (prot * transf);
580
581
582 return dice;
583 }
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().