DayZ 1.28
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 строка 2642

2643 {
2644 if (GetPluginManager())
2645 {
2647 if (playerDebug)
2648 {
2649 playerDebug.CommandHandler();
2650
2652 if (m_DebugWeaponChangeStage == 0)
2653 {
2654
2655 // debug weapon change
2656 int hideSlot;
2657
2658 if (playerDebug.IsWeaponChange(m_DebugWeaponChangeItem, hideSlot, m_DebugWeaponChangeShowSlot))
2659 {
2660 //Print("Change Weapon started: " + m_DebugWeaponChangeItem + "," + hideSlot.ToString() + "," + m_DebugWeaponChangeShowSlot.ToString());
2661
2662 HumanCommandWeapons w = GetCommandModifier_Weapons();
2663 w.StartAction(WeaponActions.HIDE, hideSlot);
2664
2666 }
2667 }
2668 else if (m_DebugWeaponChangeStage == 1)
2669 {
2670 // wait for weapon hide to meet event
2671 HumanCommandWeapons w2 = GetCommandModifier_Weapons();
2672 if (w2 && w2.GetRunningAction() == WeaponActions.HIDE)
2673 {
2674 if (w2.IsEvent() == WeaponEvents.CHANGE_HIDE)
2675 {
2677 //Print("Change Weapon - hidden: ");
2678
2680 PlayerBase player = PlayerBase.Cast(this);
2681 EntityAI item_in_hands = player.GetHumanInventory().GetEntityInHands();
2682 if (item_in_hands != NULL && player.CanDropEntity(item_in_hands) && GetGame().GetPlayer().GetHumanInventory().CanRemoveEntityInHands())
2683 {
2684 player.PredictiveDropEntity(item_in_hands);
2685 }
2686
2687 if (m_DebugWeaponChangeItem != "")
2688 {
2689 InventoryLocation dst = new InventoryLocation;
2690 dst.SetHands(this, NULL);
2692 }
2693
2695 w2.StartAction(WeaponActions.SHOW, 3);
2696
2698 }
2699 }
2700 }
2701 else if (m_DebugWeaponChangeStage == 2)
2702 {
2703 HumanCommandWeapons w3 = GetCommandModifier_Weapons();
2704 if (w3 && w3.IsActionFinished())
2705 {
2707 }
2708 }
2709 }
2710 }
2711
2712
2714 if (m_TestDamageCounter >= 0)
2715 {
2716 if (m_TestDamageCounter > 3)
2717 {
2720
2721 if (m_DebugDirectionVal > 90)
2722 {
2723 m_DebugDirectionVal = -180;
2725 }
2726
2727 if (m_DebugTypeVal)
2728 {
2729 AddCommandModifier_Damage(0, m_DebugDirectionVal); // starts light
2730 }
2731 else
2732 {
2733 StartCommand_Damage(0, m_DebugDirectionVal); // starts heavy (full body)
2734 }
2735 // 0.. types
2736 // from: -180 back, -90 left, 0 front, 90 right, 180 back
2737 //AddCommandModifier_Damage(0, directionVal); // starts light
2738 //StartCommand_Damage(0, 0); // starts heavy (full body)
2739 }
2740
2741 m_TestDamageCounter += pDt;
2742 }
2743
2744
2745#ifndef NO_GUI
2746#ifdef DEVELOPER
2747
2748 // injury / exhaustion
2749 {
2750 HumanCommandAdditives ad = GetCommandModifier_Additives();
2751
2753 float v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWINJURY);
2754 if (v > 0)
2755 {
2756 ad.SetInjured(v, true);
2757 }
2758
2760 v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWEXHAUSTION);
2761 if (v > 0)
2762 {
2763 ad.SetExhaustion(v, true);
2764 }
2765 }
2766#endif
2767#endif
2768
2769 }
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
PlayerBase GetPlayer()
Определения ModifierBase.c:51
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:274
float m_TestDamageCounter
Определения DayZPlayerImplement.c:2633
int m_DebugWeaponChangeShowSlot
Определения DayZPlayerImplement.c:2639
string m_DebugWeaponChangeItem
Определения DayZPlayerImplement.c:2638
bool m_DebugTypeVal
Определения DayZPlayerImplement.c:2635
int m_DebugWeaponChangeStage
Определения DayZPlayerImplement.c:2637
float m_DebugDirectionVal
VKOSTIK - tady dat 0 misto -1.
Определения DayZPlayerImplement.c:2634
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
proto native CGame GetGame()
WeaponActions
actions
Определения human.c:816
WeaponEvents
events
Определения human.c:967
void HumanCommandWeapons()
Определения human.c:1126
class HumanCommandWeapons HumanCommandAdditives()
Определения human.c:1125

Перекрестные ссылки ECE_IN_INVENTORY, DiagMenu::GetEngineRangeValue(), GetGame(), GetPlayer(), 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().