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

◆ ProcessHandDamage()

void ManBase::ProcessHandDamage ( float delta_time,
HumanMovementState pState )
inlineprotected

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

1851 {
1852 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_SERVER || !g_Game.IsMultiplayer())
1853 {
1854 if (pState.m_iMovement == DayZPlayerConstants.MOVEMENTIDX_SLIDE)
1855 {
1856 //Print("sliding down");
1857 EntityAI gloves = GetInventory().FindAttachment(InventorySlots.GLOVES);
1858
1859 if (gloves && gloves.GetHealthLevel() < 4)
1860 {
1861 gloves.AddHealth("","", PlayerConstants.GLOVES_DAMAGE_SLIDING_LADDER_PER_SEC * delta_time);
1862 return;
1863 }
1864
1865 if (Math.RandomFloat01() < PlayerConstants.CHANCE_TO_BLEED_SLIDING_LADDER_PER_SEC * delta_time)
1866 {
1867 if (Math.RandomFloat01() < 0.5)
1868 {
1869 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("LeftForeArmRoll"))
1870 {
1871 SendSoundEvent(EPlayerSoundEventID.INJURED_LIGHT);
1872 }
1873 }
1874 else
1875 {
1876 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("RightForeArmRoll"))
1877 {
1878 SendSoundEvent(EPlayerSoundEventID.INJURED_LIGHT);
1879 }
1880 }
1881 }
1882
1883 }
1884 }
1885 }
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:3942
EPlayerSoundEventID
Определения PlayerSoundEventHandler.c:3
int m_iMovement
current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance
Определения human.c:1157
BleedingSourcesManagerServer GetBleedingManagerServer()
Определения PlayerBase.c:2773
void SendSoundEvent(EPlayerSoundEventID id)
Определения PlayerBase.c:7450
DayZPlayerInstanceType
defined in C++
Определения dayzplayer.c:1071
proto native DayZPlayerInstanceType GetInstanceType()
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602

Перекрестные ссылки PlayerConstants::CHANCE_TO_BLEED_SLIDING_LADDER_PER_SEC, g_Game, GetBleedingManagerServer(), GetInstanceType(), PlayerConstants::GLOVES_DAMAGE_SLIDING_LADDER_PER_SEC, HumanMovementState::m_iMovement, Math::RandomFloat01() и SendSoundEvent().

Используется в OnLadder().