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

◆ CommandHandlerDebug()

void DayZPlayer::CommandHandlerDebug ( float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished )
inlineprotected

debug handling of adding commands

set item in hands

fuj

start show

damage test

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

2711 {
2712 if (GetPluginManager())
2713 {
2715 if (playerDebug)
2716 {
2717 playerDebug.CommandHandler();
2718
2720 if (m_DebugWeaponChangeStage == 0)
2721 {
2722
2723 // debug weapon change
2724 int hideSlot;
2725
2726 if (playerDebug.IsWeaponChange(m_DebugWeaponChangeItem, hideSlot, m_DebugWeaponChangeShowSlot))
2727 {
2728 //Print("Change Weapon started: " + m_DebugWeaponChangeItem + "," + hideSlot.ToString() + "," + m_DebugWeaponChangeShowSlot.ToString());
2729
2730 HumanCommandWeapons w = GetCommandModifier_Weapons();
2731 w.StartAction(WeaponActions.HIDE, hideSlot);
2732
2734 }
2735 }
2736 else if (m_DebugWeaponChangeStage == 1)
2737 {
2738 // wait for weapon hide to meet event
2739 HumanCommandWeapons w2 = GetCommandModifier_Weapons();
2740 if (w2 && w2.GetRunningAction() == WeaponActions.HIDE)
2741 {
2742 if (w2.IsEvent() == WeaponEvents.CHANGE_HIDE)
2743 {
2745 //Print("Change Weapon - hidden: ");
2746
2748 PlayerBase player = PlayerBase.Cast(this);
2749 EntityAI item_in_hands = player.GetEntityInHands();
2750 if (item_in_hands != NULL && player.CanDropEntity(item_in_hands) && g_Game.GetPlayer().GetHumanInventory().CanRemoveEntityInHands())
2751 {
2752 player.PredictiveDropEntity(item_in_hands);
2753 }
2754
2755 if (m_DebugWeaponChangeItem != "")
2756 {
2757 InventoryLocation dst = new InventoryLocation;
2758 dst.SetHands(this, NULL);
2760 }
2761
2763 w2.StartAction(WeaponActions.SHOW, 3);
2764
2766 }
2767 }
2768 }
2769 else if (m_DebugWeaponChangeStage == 2)
2770 {
2771 HumanCommandWeapons w3 = GetCommandModifier_Weapons();
2772 if (w3 && w3.IsActionFinished())
2773 {
2775 }
2776 }
2777 }
2778 }
2779
2780
2782 if (m_TestDamageCounter >= 0)
2783 {
2784 if (m_TestDamageCounter > 3)
2785 {
2788
2789 if (m_DebugDirectionVal > 90)
2790 {
2791 m_DebugDirectionVal = -180;
2793 }
2794
2795 if (m_DebugTypeVal)
2796 {
2797 AddCommandModifier_Damage(0, m_DebugDirectionVal); // starts light
2798 }
2799 else
2800 {
2801 StartCommand_Damage(0, m_DebugDirectionVal); // starts heavy (full body)
2802 }
2803 // 0.. types
2804 // from: -180 back, -90 left, 0 front, 90 right, 180 back
2805 //AddCommandModifier_Damage(0, directionVal); // starts light
2806 //StartCommand_Damage(0, 0); // starts heavy (full body)
2807 }
2808
2809 m_TestDamageCounter += pDt;
2810 }
2811
2812
2813#ifndef NO_GUI
2814#ifdef DEVELOPER
2815
2816 // injury / exhaustion
2817 {
2818 HumanCommandAdditives ad = GetCommandModifier_Additives();
2819
2821 float v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWINJURY);
2822 if (v > 0)
2823 {
2824 ad.SetInjured(v, true);
2825 }
2826
2828 v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWEXHAUSTION);
2829 if (v > 0)
2830 {
2831 ad.SetExhaustion(v, true);
2832 }
2833 }
2834#endif
2835#endif
2836
2837 }
class LogManager EntityAI
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
const int ECE_IN_INVENTORY
Определения CentralEconomy.c:37
const int RF_DEFAULT
Определения CentralEconomy.c:66
DayZGame g_Game
Определения DayZGame.c:4074
void PluginDayzPlayerDebug()
Определения PluginDayzPlayerDebug.c:275
PluginManager GetPluginManager()
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
Определения PluginManager.c:284
float m_TestDamageCounter
Определения DayZPlayerImplement.c:2701
int m_DebugWeaponChangeShowSlot
Определения DayZPlayerImplement.c:2707
string m_DebugWeaponChangeItem
Определения DayZPlayerImplement.c:2706
bool m_DebugTypeVal
Определения DayZPlayerImplement.c:2703
int m_DebugWeaponChangeStage
Определения DayZPlayerImplement.c:2705
float m_DebugDirectionVal
VKOSTIK - tady dat 0 misto -1.
Определения DayZPlayerImplement.c:2702
proto native bool IsActionFinished()
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
proto native bool StartAction(WeaponActions pAction, int pActionType)
start reload,mechanism,chambering,unjam ...
proto native int IsEvent()
return -1 when there is no event, otherwise it returns pId of event from animation
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
WeaponActions
actions
Определения human.c:843
WeaponEvents
events
Определения human.c:996
void HumanCommandWeapons()
Определения human.c:1155
class HumanCommandWeapons HumanCommandAdditives()
Определения human.c:1154

Перекрестные ссылки ECE_IN_INVENTORY, g_Game, DiagMenu::GetEngineRangeValue(), GetPluginManager(), HumanCommandWeapons::GetRunningAction(), HumanCommandAdditives(), HumanCommandWeapons::IsActionFinished(), HumanCommandWeapons::IsEvent(), m_DebugDirectionVal, m_DebugTypeVal, m_DebugWeaponChangeItem, m_DebugWeaponChangeShowSlot, m_DebugWeaponChangeStage, m_TestDamageCounter, PluginDayzPlayerDebug(), RF_DEFAULT, InventoryLocation::SetHands(), SpawnEntity() и HumanCommandWeapons::StartAction().