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

◆ OnUnconsciousStart()

void ManBase::OnUnconsciousStart ( )
inlineprotected

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

3757 {
3759
3761
3762 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT)
3763 {
3764#ifndef NO_GUI
3765 g_Game.GetMission().GetHud().ShowHudUI(false);
3766#endif
3768 HumanCommandUnconscious hcu = GetCommand_Unconscious();
3769 if (hcu.IsRagdoll() || m_LastCommandBeforeUnconscious != DayZPlayerConstants.COMMANDID_VEHICLE)
3770 {
3771 EntityAI entityInHands = GetEntityInHands();
3772 if (entityInHands && CanDropEntity(entityInHands) && !IsRestrained() && !IsSurrendered())
3773 {
3774 DropItem(ItemBase.Cast(entityInHands));
3775 }
3776 }
3777
3778 g_Game.GetSoundScene().SetSoundVolume(0,2);
3779#ifndef NO_GUI
3780 m_EffectWidgets.AddSuspendRequest(EffectWidgetSuspends.UNCON);
3781#endif
3782
3783#ifdef ROBOCLIENT
3784 RequestRespawnBot();
3785#endif
3786 }
3787
3788 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_SERVER || (!g_Game.IsMultiplayer() && GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT))
3789 {
3790 SetSynchDirty();
3791
3792 if (m_LastCommandBeforeUnconscious == DayZPlayerConstants.COMMANDID_VEHICLE)
3793 {
3794 if (m_TransportCache)
3795 m_TransportCache.MarkCrewMemberUnconscious(m_TransportCache.CrewMemberIndex(this));
3796 }
3797
3798 // disable voice communication
3799 g_Game.EnableVoN(this, false);
3800
3801 if (m_AdminLog)
3802 {
3803 m_AdminLog.UnconStart(this);
3804 }
3805
3806 // When we fall uncon we force out of block
3807 if (GetMeleeFightLogic())
3808 {
3809 GetMeleeFightLogic().SetBlock(false);
3810 }
3811 }
3812
3813 SetMasterAttenuation("UnconsciousAttenuation");
3814
3816 m_OnUnconsciousStart.Invoke(this);
3817 }
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:4074
class GP5GasMask extends MaskBase ItemBase
proto native bool IsRagdoll()
override bool IsSurrendered()
Определения PlayerBase.c:8962
override bool IsRestrained()
Определения PlayerBase.c:2219
GameplayEffectWidgets_base m_EffectWidgets
effect widgets
Определения PlayerBase.c:342
override bool CanDropEntity(notnull EntityAI item)
Определения PlayerBase.c:1010
override void RequestSoundEventStop(EPlayerSoundEventID id, bool from_server_and_client=false, int param=EPlayerSoundEventParam.STOP_PLAYBACK)
Определения PlayerBase.c:7784
void CloseInventoryMenu()
Определения PlayerBase.c:6947
ref ScriptInvoker m_OnUnconsciousStart
invokers
Определения PlayerBase.c:353
PluginAdminLog m_AdminLog
Определения PlayerBase.c:322
bool DropItem(ItemBase item)
Определения PlayerBase.c:6818
override void SetInventorySoftLock(bool status)
'soft lock' meaning inventory screen cannot be displayed, but mechanically, inventory operations are ...
Определения PlayerBase.c:8684
DayZPlayerInstanceType
defined in C++
Определения dayzplayer.c:1084
proto native DayZPlayerInstanceType GetInstanceType()
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
void HumanCommandUnconscious()
Определения human.c:660

Перекрестные ссылки CanDropEntity(), CloseInventoryMenu(), DropItem(), g_Game, GetInstanceType(), HumanCommandUnconscious::IsRagdoll(), IsRestrained(), IsSurrendered(), m_AdminLog, m_EffectWidgets, m_OnUnconsciousStart, RequestSoundEventStop() и SetInventorySoftLock().

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