952 {
953 PlayerBase player = gotActionData.
m_Player;
954
955 array<ClothingBase> equippedClothes = new array<ClothingBase>;
956 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"LEGS")));
957 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"BACK")));
958 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"VEST")));
959 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"HeadGear")));
960 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"Mask")));
961 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"BODY")));
962 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"FEET")));
963 equippedClothes.Insert(
ClothingBase.Cast(player.GetItemOnSlot(
"GLOVES")));
964
965
966 float shockTaken = (gotActionData.
m_Speed * gotActionData.
m_Speed) / ActionGetOutTransport.DMG_FACTOR;
967
968
970 HelmetBase helmet;
971 if (Class.CastTo(helmet, headGear))
972 shockTaken *= 0.5;
973
974
975
976 int randNum;
977 randNum = Math.RandomInt(0, 100);
978 if (gotActionData.
m_Speed < ActionGetOutTransport.LOW_SPEED_VALUE)
979 {
980 if (randNum < 20)
981 player.GiveShock(-shockTaken);
982
983 randNum = Math.RandomIntInclusive(0, PlayerBase.m_BleedingSourcesLow.Count() - 1);
984
985 if (player.m_BleedingManagerServer)
986 player.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection(PlayerBase.m_BleedingSourcesLow[randNum]);
987 }
988 else if (gotActionData.
m_Speed >= ActionGetOutTransport.LOW_SPEED_VALUE && gotActionData.
m_Speed < ActionGetOutTransport.HIGH_SPEED_VALUE)
989 {
990 if (randNum < 50)
991 player.GiveShock(-shockTaken);
992
993 randNum = Math.RandomInt(0, PlayerBase.m_BleedingSourcesUp.Count() - 1);
994
995 if (player.m_BleedingManagerServer)
996 player.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection(PlayerBase.m_BleedingSourcesUp[randNum]);
997 }
998 else if (gotActionData.
m_Speed >= ActionGetOutTransport.HIGH_SPEED_VALUE)
999 {
1000 if (!headGear && player.m_BleedingManagerServer)
1001 player.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection("Head");
1002
1003 if (randNum < 75)
1004 player.GiveShock(-shockTaken);
1005 }
1006
1007 float dmgTaken = (gotActionData.
m_Speed * gotActionData.
m_Speed) / ActionGetOutTransport.SHOCK_FACTOR;
1008
1009
1011 {
1012
1013 if (cloth == null)
1014 continue;
1015
1016 cloth.DecreaseHealth(dmgTaken, false);
1017 }
1018
1019 vector posMS = gotActionData.
m_Player.WorldToModel(gotActionData.
m_Player.GetPosition());
1020 gotActionData.
m_Player.DamageAllLegs(dmgTaken);
1021
1022 float healthCoef = Math.InverseLerp(ActionGetOutTransport.HEALTH_LOW_SPEED_VALUE, ActionGetOutTransport.HEALTH_HIGH_SPEED_VALUE, gotActionData.
m_Speed);
1023 healthCoef = Math.Clamp(healthCoef, 0.0, 1.0);
1024 gotActionData.
m_Player.ProcessDirectDamage(
DamageType.CUSTOM, gotActionData.
m_Player,
"",
"FallDamageHealth", posMS, healthCoef);
1025 }
DamageType
exposed from C++ (do not change)
class GP5GasMask extends MaskBase ItemBase