DayZ 1.29
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 строка 2676

2677 {
2678 if (GetPluginManager())
2679 {
2681 if (playerDebug)
2682 {
2683 playerDebug.CommandHandler();
2684
2686 if (m_DebugWeaponChangeStage == 0)
2687 {
2688
2689 // debug weapon change
2690 int hideSlot;
2691
2692 if (playerDebug.IsWeaponChange(m_DebugWeaponChangeItem, hideSlot, m_DebugWeaponChangeShowSlot))
2693 {
2694 //Print("Change Weapon started: " + m_DebugWeaponChangeItem + "," + hideSlot.ToString() + "," + m_DebugWeaponChangeShowSlot.ToString());
2695
2696 HumanCommandWeapons w = GetCommandModifier_Weapons();
2697 w.StartAction(WeaponActions.HIDE, hideSlot);
2698
2700 }
2701 }
2702 else if (m_DebugWeaponChangeStage == 1)
2703 {
2704 // wait for weapon hide to meet event
2705 HumanCommandWeapons w2 = GetCommandModifier_Weapons();
2706 if (w2 && w2.GetRunningAction() == WeaponActions.HIDE)
2707 {
2708 if (w2.IsEvent() == WeaponEvents.CHANGE_HIDE)
2709 {
2711 //Print("Change Weapon - hidden: ");
2712
2714 PlayerBase player = PlayerBase.Cast(this);
2715 EntityAI item_in_hands = player.GetEntityInHands();
2716 if (item_in_hands != NULL && player.CanDropEntity(item_in_hands) && g_Game.GetPlayer().GetHumanInventory().CanRemoveEntityInHands())
2717 {
2718 player.PredictiveDropEntity(item_in_hands);
2719 }
2720
2721 if (m_DebugWeaponChangeItem != "")
2722 {
2723 InventoryLocation dst = new InventoryLocation;
2724 dst.SetHands(this, NULL);
2726 }
2727
2729 w2.StartAction(WeaponActions.SHOW, 3);
2730
2732 }
2733 }
2734 }
2735 else if (m_DebugWeaponChangeStage == 2)
2736 {
2737 HumanCommandWeapons w3 = GetCommandModifier_Weapons();
2738 if (w3 && w3.IsActionFinished())
2739 {
2741 }
2742 }
2743 }
2744 }
2745
2746
2748 if (m_TestDamageCounter >= 0)
2749 {
2750 if (m_TestDamageCounter > 3)
2751 {
2754
2755 if (m_DebugDirectionVal > 90)
2756 {
2757 m_DebugDirectionVal = -180;
2759 }
2760
2761 if (m_DebugTypeVal)
2762 {
2763 AddCommandModifier_Damage(0, m_DebugDirectionVal); // starts light
2764 }
2765 else
2766 {
2767 StartCommand_Damage(0, m_DebugDirectionVal); // starts heavy (full body)
2768 }
2769 // 0.. types
2770 // from: -180 back, -90 left, 0 front, 90 right, 180 back
2771 //AddCommandModifier_Damage(0, directionVal); // starts light
2772 //StartCommand_Damage(0, 0); // starts heavy (full body)
2773 }
2774
2775 m_TestDamageCounter += pDt;
2776 }
2777
2778
2779#ifndef NO_GUI
2780#ifdef DEVELOPER
2781
2782 // injury / exhaustion
2783 {
2784 HumanCommandAdditives ad = GetCommandModifier_Additives();
2785
2787 float v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWINJURY);
2788 if (v > 0)
2789 {
2790 ad.SetInjured(v, true);
2791 }
2792
2794 v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWEXHAUSTION);
2795 if (v > 0)
2796 {
2797 ad.SetExhaustion(v, true);
2798 }
2799 }
2800#endif
2801#endif
2802
2803 }
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:36
const int RF_DEFAULT
Определения CentralEconomy.c:65
DayZGame g_Game
Определения DayZGame.c:3942
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:283
float m_TestDamageCounter
Определения DayZPlayerImplement.c:2667
int m_DebugWeaponChangeShowSlot
Определения DayZPlayerImplement.c:2673
string m_DebugWeaponChangeItem
Определения DayZPlayerImplement.c:2672
bool m_DebugTypeVal
Определения DayZPlayerImplement.c:2669
int m_DebugWeaponChangeStage
Определения DayZPlayerImplement.c:2671
float m_DebugDirectionVal
VKOSTIK - tady dat 0 misto -1.
Определения DayZPlayerImplement.c:2668
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:816
WeaponEvents
events
Определения human.c:969
void HumanCommandWeapons()
Определения human.c:1128
class HumanCommandWeapons HumanCommandAdditives()
Определения human.c:1127

Перекрестные ссылки 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().