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

◆ ProcessHandDamage()

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

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

1721 {
1722 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_SERVER || !GetGame().IsMultiplayer())
1723 {
1724 if (pState.m_iMovement == DayZPlayerConstants.MOVEMENTIDX_SLIDE)
1725 {
1726 //Print("sliding down");
1727 EntityAI gloves = GetInventory().FindAttachment(InventorySlots.GLOVES);
1728
1729 if (gloves && gloves.GetHealthLevel() < 4)
1730 {
1731 gloves.AddHealth("","", PlayerConstants.GLOVES_DAMAGE_SLIDING_LADDER_PER_SEC * delta_time);
1732 return;
1733 }
1734
1735 if (Math.RandomFloat01() < PlayerConstants.CHANCE_TO_BLEED_SLIDING_LADDER_PER_SEC * delta_time)
1736 {
1737 if (Math.RandomFloat01() < 0.5)
1738 {
1739 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("LeftForeArmRoll"))
1740 {
1741 SendSoundEvent(EPlayerSoundEventID.INJURED_LIGHT);
1742 }
1743 }
1744 else
1745 {
1746 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("RightForeArmRoll"))
1747 {
1748 SendSoundEvent(EPlayerSoundEventID.INJURED_LIGHT);
1749 }
1750 }
1751 }
1752
1753 }
1754 }
1755 }
class LogManager EntityAI
EPlayerSoundEventID
Определения PlayerSoundEventHandler.c:3
int m_iMovement
current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance
Определения human.c:1142
BleedingSourcesManagerServer GetBleedingManagerServer()
Определения PlayerBase.c:2655
void SendSoundEvent(EPlayerSoundEventID id)
Определения PlayerBase.c:7211
DayZPlayerInstanceType
defined in C++
Определения dayzplayer.c:1068
proto native DayZPlayerInstanceType GetInstanceType()
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
proto native CGame GetGame()

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

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