DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ProcessFeetDamageServer()

override void ManBase::ProcessFeetDamageServer ( int pUserInt)
inlineprotected

См. определение в файле PlayerBase.c строка 1757

1758 {
1759 //InventorySlots.HEADGEAR
1760 EntityAI shoes = GetInventory().FindAttachment(InventorySlots.FEET);
1761
1762 string surface; int liquid;
1763 GetGame().SurfaceUnderObject(this, surface, liquid);
1764 float modifier_surface = Surface.GetParamFloat(surface, "footDamage");
1765
1766 if (shoes && shoes.GetHealthLevel() < 4)
1767 {
1768 shoes.AddHealth("", "", -1 * modifier_surface * PlayerConstants.SHOES_MOVEMENT_DAMAGE_PER_STEP * (float)PlayerConstants.CHECK_EVERY_N_STEP);
1769
1770 return;
1771 }
1772
1773 float rnd = Math.RandomFloat01();
1774 float modifier_movement = GetFeetDamageMoveModifier();
1775 float chance = modifier_movement * modifier_surface * PlayerConstants.BAREFOOT_MOVEMENT_BLEED_MODIFIER * (float)PlayerConstants.CHECK_EVERY_N_STEP;
1776 if (rnd < chance)
1777 {
1778 if (pUserInt % 2 == 0)
1779 {
1780 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("RightFoot"))
1781 SendSoundEvent(EPlayerSoundEventID.INJURED_LIGHT);
1782
1783 }
1784 else
1785 {
1786 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("LeftFoot"))
1787 SendSoundEvent(EPlayerSoundEventID.INJURED_LIGHT);
1788 }
1789 }
1790 }
class LogManager EntityAI
EPlayerSoundEventID
Определения PlayerSoundEventHandler.c:3
proto void SurfaceUnderObject(notnull Object object, out string type, out int liquidType)
BleedingSourcesManagerServer GetBleedingManagerServer()
Определения PlayerBase.c:2655
void SendSoundEvent(EPlayerSoundEventID id)
Определения PlayerBase.c:7211
float GetFeetDamageMoveModifier()
Определения PlayerBase.c:1792
proto native CGame GetGame()

Перекрестные ссылки PlayerConstants::BAREFOOT_MOVEMENT_BLEED_MODIFIER, PlayerConstants::CHECK_EVERY_N_STEP, GetBleedingManagerServer(), GetFeetDamageMoveModifier(), GetGame(), Surface::GetParamFloat(), Math::RandomFloat01(), SendSoundEvent(), PlayerConstants::SHOES_MOVEMENT_DAMAGE_PER_STEP и CGame::SurfaceUnderObject().