1117 {
1119
1121 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"LEGS")));
1122 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"BACK")));
1123 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"VEST")));
1124 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"HeadGear")));
1125 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"Mask")));
1126 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"BODY")));
1127 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"FEET")));
1128 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"GLOVES")));
1129
1130
1132
1133
1137 shockTaken *= 0.5;
1138
1139
1140
1141 int randNum;
1144 {
1145 if (randNum < 20)
1146 player.GiveShock(-shockTaken);
1147
1149
1150 player.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection(
PlayerBase.m_BleedingSourcesLow[randNum]);
1151 }
1153 {
1154 if (randNum < 50)
1155 player.GiveShock(-shockTaken);
1156
1158
1159 player.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection(
PlayerBase.m_BleedingSourcesUp[randNum]);
1160 }
1162 {
1163 if (!headGear)
1164 player.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection("Head");
1165
1166 if (randNum < 75)
1167 player.GiveShock(-shockTaken);
1168 }
1169
1171
1172
1174 {
1175
1176 if (cloth == null)
1177 continue;
1178
1179 cloth.DecreaseHealth(dmgTaken, false);
1180 }
1181
1182 vector posMS = gotActionData.m_Player.WorldToModel(gotActionData.m_Player.GetPosition());
1183 gotActionData.m_Player.DamageAllLegs(dmgTaken);
1184
1186 healthCoef =
Math.
Clamp(healthCoef, 0.0, 1.0);
1187 gotActionData.m_Player.ProcessDirectDamage(
DamageType.CUSTOM, gotActionData.m_Player,
"",
"FallDamageHealth", posMS, healthCoef);
1188 }
DamageType
exposed from C++ (do not change)
const int LOW_SPEED_VALUE
const int HEALTH_HIGH_SPEED_VALUE
const int HIGH_SPEED_VALUE
const int HEALTH_LOW_SPEED_VALUE
Super root of all classes in Enforce script.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
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 float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].