60 {
61 int agentCount = player.m_AgentPool.GetSingleAgentCount(
eAgents.FOOD_POISON);
63 return;
64
65 int agentMax = PluginTransmissionAgents.GetAgentMaxCount(
eAgents.FOOD_POISON);
66
67 float invertedAgentCountValue = Math.InverseLerp(0, agentMax, agentCount);
69 chance = (chance / 300) * deltaT;
70
71 if (Math.RandomFloat01() < chance)
72 {
73 SymptomBase symptom = player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_VOMIT);
74 if (symptom)
75 {
76 CachedObjectsParams.PARAM1_FLOAT.param1 = 30.0 * invertedAgentCountValue;
77 symptom.
SetParam(CachedObjectsParams.PARAM1_FLOAT);
78 symptom.
SetDuration(Math.Max(3.0, 10 * invertedAgentCountValue));
79
80 player.m_AgentPool.ReduceAgent(
eAgents.FOOD_POISON, 60);
85
88
91 }
92 }
93
95 {
98 {
101
103 }
104 }
105 }
static const int VOMIT_OCCURRENCES_MIN
static const int WATER_DRAIN_FROM_VOMIT
static const int VOMIT_OCCURRENCES_MAX
static const int AGENT_THRESHOLD_DEACTIVATE
static const int ENERGY_DRAIN_FROM_VOMIT
void SetDuration(float duration)