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

◆ CommitSuicide()

void CommitSuicide ( )
protected

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

688 {
689 Weapon_Base weapon;
690 WeaponEventBase weapon_event = new WeaponEventTrigger;
691
692 if (Weapon_Base.CastTo(weapon,m_Player.GetItemInHands()))
693 {
694 if (weapon.CanFire())
695 {
696 m_Callback.RegisterAnimationEvent("Simulation_End",EmoteConstants.EMOTE_SUICIDE_SIMULATION_END);
697 m_Player.SetSuicide(true);
698 weapon.ProcessWeaponEvent(weapon_event);
699 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_FINISH);
700 if (m_Player.IsAlive())
701 {
702 EntityAI helm = m_Player.FindAttachmentBySlotName("Headgear");
703 if (helm && GetGame().IsServer())
704 {
705 float damage = helm.GetMaxHealth("","");
706 helm.AddHealth("","", -damage/2);
707 }
709 if (m_AdminLog)
710 {
711 m_AdminLog.Suicide(m_Player);
712 }
713 }
714 }
715 else
716 {
717 if (!weapon.IsDamageDestroyed())
718 {
719 weapon.ProcessWeaponEvent(weapon_event);
720 }
721 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
722 }
723 }
724 else if (m_Player.GetItemInHands() && m_Player.GetItemInHands().ConfigIsExisting("suicideAnim"))
725 {
726 m_Callback.RegisterAnimationEvent("Death",EmoteConstants.EMOTE_SUICIDE_DEATH);
727 m_Callback.RegisterAnimationEvent("Bleed",EmoteConstants.EMOTE_SUICIDE_BLEED);
728 m_Callback.RegisterAnimationEvent("Simulation_End",EmoteConstants.EMOTE_SUICIDE_SIMULATION_END);
729 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_FINISH);
730 m_Player.SetSuicide(true);
731 }
732 else
733 {
734 m_Callback.InternalCommand(DayZPlayerConstants.CMD_ACTIONINT_FINISH);
735 }
736 }
EmoteCB m_Callback
Определения EmoteManager.c:111
PluginAdminLog m_AdminLog
Определения EmoteManager.c:142
void KillPlayer()
Определения EmoteManager.c:738
DayZPlayer m_Player
Определения Hand_Events.c:42
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
shorthand
Определения BoltActionRifle_Base.c:6
signalize mechanism manipulation
Определения Events.c:35
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
proto native CGame GetGame()
const int EMOTE_SUICIDE_SIMULATION_END
Определения 3_Game/constants.c:410
const int EMOTE_SUICIDE_BLEED
Определения 3_Game/constants.c:409
const int EMOTE_SUICIDE_DEATH
Определения 3_Game/constants.c:408
const int CALL_CATEGORY_GAMEPLAY
Определения 3_Game/tools/tools.c:10

Перекрестные ссылки ScriptCallQueue::Call(), CALL_CATEGORY_GAMEPLAY, EmoteConstants::EMOTE_SUICIDE_BLEED, EmoteConstants::EMOTE_SUICIDE_DEATH, EmoteConstants::EMOTE_SUICIDE_SIMULATION_END, CGame::GetCallQueue(), GetGame(), KillPlayer(), m_AdminLog, m_Callback и m_Player.

Используется в RequestCommitSuicide() и Update().