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

◆ ProcessHandDamage()

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

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

1909 {
1910 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_SERVER || !g_Game.IsMultiplayer())
1911 {
1912 if (pState.m_iMovement == DayZPlayerConstants.MOVEMENTIDX_SLIDE)
1913 {
1914 //Print("sliding down");
1915 EntityAI gloves = GetInventory().FindAttachment(InventorySlots.GLOVES);
1916
1917 if (gloves && gloves.GetHealthLevel() < 4)
1918 {
1919 gloves.AddHealth("","", PlayerConstants.GLOVES_DAMAGE_SLIDING_LADDER_PER_SEC * delta_time);
1920 return;
1921 }
1922
1923 if (Math.RandomFloat01() < PlayerConstants.CHANCE_TO_BLEED_SLIDING_LADDER_PER_SEC * delta_time)
1924 {
1925 if (Math.RandomFloat01() < 0.5)
1926 {
1927 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("LeftForeArmRoll"))
1928 {
1929 SendSoundEvent(EPlayerSoundEventID.INJURED_LIGHT);
1930 }
1931 }
1932 else
1933 {
1934 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection("RightForeArmRoll"))
1935 {
1936 SendSoundEvent(EPlayerSoundEventID.INJURED_LIGHT);
1937 }
1938 }
1939 }
1940
1941 }
1942 }
1943 }
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:4074
EPlayerSoundEventID
Определения PlayerSoundEventHandler.c:3
int m_iMovement
current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance
Определения human.c:1184
BleedingSourcesManagerServer GetBleedingManagerServer()
Определения PlayerBase.c:2973
void SendSoundEvent(EPlayerSoundEventID id)
Определения PlayerBase.c:7795
DayZPlayerInstanceType
defined in C++
Определения dayzplayer.c:1084
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().