DayZ 1.27
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 строка 2576

2577 {
2578 if (GetPluginManager())
2579 {
2581 if (playerDebug)
2582 {
2583 playerDebug.CommandHandler();
2584
2586 if (m_DebugWeaponChangeStage == 0)
2587 {
2588
2589 // debug weapon change
2590 int hideSlot;
2591
2592 if (playerDebug.IsWeaponChange(m_DebugWeaponChangeItem, hideSlot, m_DebugWeaponChangeShowSlot))
2593 {
2594 //Print("Change Weapon started: " + m_DebugWeaponChangeItem + "," + hideSlot.ToString() + "," + m_DebugWeaponChangeShowSlot.ToString());
2595
2596 HumanCommandWeapons w = GetCommandModifier_Weapons();
2597 w.StartAction(WeaponActions.HIDE, hideSlot);
2598
2600 }
2601 }
2602 else if (m_DebugWeaponChangeStage == 1)
2603 {
2604 // wait for weapon hide to meet event
2605 HumanCommandWeapons w2 = GetCommandModifier_Weapons();
2606 if (w2 && w2.GetRunningAction() == WeaponActions.HIDE)
2607 {
2608 if (w2.IsEvent() == WeaponEvents.CHANGE_HIDE)
2609 {
2611 //Print("Change Weapon - hidden: ");
2612
2614 PlayerBase player = PlayerBase.Cast(this);
2615 EntityAI item_in_hands = player.GetHumanInventory().GetEntityInHands();
2616 if (item_in_hands != NULL && player.CanDropEntity(item_in_hands) && GetGame().GetPlayer().GetHumanInventory().CanRemoveEntityInHands())
2617 {
2618 player.PredictiveDropEntity(item_in_hands);
2619 }
2620
2621 if (m_DebugWeaponChangeItem != "")
2622 {
2623 InventoryLocation dst = new InventoryLocation;
2624 dst.SetHands(this, NULL);
2626 }
2627
2629 w2.StartAction(WeaponActions.SHOW, 3);
2630
2632 }
2633 }
2634 }
2635 else if (m_DebugWeaponChangeStage == 2)
2636 {
2637 HumanCommandWeapons w3 = GetCommandModifier_Weapons();
2638 if (w3 && w3.IsActionFinished())
2639 {
2641 }
2642 }
2643 }
2644 }
2645
2646
2648 if (m_TestDamageCounter >= 0)
2649 {
2650 if (m_TestDamageCounter > 3)
2651 {
2654
2655 if (m_DebugDirectionVal > 90)
2656 {
2657 m_DebugDirectionVal = -180;
2659 }
2660
2661 if (m_DebugTypeVal)
2662 {
2663 AddCommandModifier_Damage(0, m_DebugDirectionVal); // starts light
2664 }
2665 else
2666 {
2667 StartCommand_Damage(0, m_DebugDirectionVal); // starts heavy (full body)
2668 }
2669 // 0.. types
2670 // from: -180 back, -90 left, 0 front, 90 right, 180 back
2671 //AddCommandModifier_Damage(0, directionVal); // starts light
2672 //StartCommand_Damage(0, 0); // starts heavy (full body)
2673 }
2674
2675 m_TestDamageCounter += pDt;
2676 }
2677
2678
2679#ifndef NO_GUI
2680#ifdef DEVELOPER
2681
2682 // injury / exhaustion
2683 {
2684 HumanCommandAdditives ad = GetCommandModifier_Additives();
2685
2687 float v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWINJURY);
2688 if (v > 0)
2689 {
2690 ad.SetInjured(v, true);
2691 }
2692
2694 v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWEXHAUSTION);
2695 if (v > 0)
2696 {
2697 ad.SetExhaustion(v, true);
2698 }
2699 }
2700#endif
2701#endif
2702
2703 }
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:2567
int m_DebugWeaponChangeShowSlot
Определения DayZPlayerImplement.c:2573
string m_DebugWeaponChangeItem
Определения DayZPlayerImplement.c:2572
bool m_DebugTypeVal
Определения DayZPlayerImplement.c:2569
int m_DebugWeaponChangeStage
Определения DayZPlayerImplement.c:2571
float m_DebugDirectionVal
VKOSTIK - tady dat 0 misto -1.
Определения DayZPlayerImplement.c:2568
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:963
void HumanCommandWeapons()
Определения human.c:1113
class HumanCommandWeapons HumanCommandAdditives()
Определения human.c:1112

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