125 {
130
131 float protectionLevel = 0.0;
133 array<Entity> coverItems = player.GetCachedEquipment().GetEntitiesByCategory(query);
134 int coverItemsCount = coverItems.Count();
135 for (int i = 0; i < coverItemsCount; ++i)
136 {
137 coverItem =
ItemBase.Cast(coverItems[i]);
139 if (protectionLevel > 0.0)
140 break;
141 }
142
143 float coughIntensity =
Math.
Clamp(sandstormIntensity - protectionLevel, 0.0, 1.0);;
145
146 if (coughIntensity > 0.0)
148 else
150
152 {
154
157 if (rand <= coughIntensity)
158 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);
159 }
160 }
ECachedEquipmentItemCategory
ECachedEquipmentPlacement
const float COUGH_INTERVAL_MAX
seconds
SandstormExposureStaticMdfr COUGH_INTERVAL_MIN
ECachedEquipmentItemCategory m_Category
ECachedEquipmentPlacement m_Placement
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
const int DEF_DUST_PARTICLE_BREATH
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
static proto int Randomize(int seed)
Sets the seed for the random number generator.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].