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

◆ OnUpdate() [4/4]

override void WeaponStartAction::OnUpdate ( float dt)
inlineprivate

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

28 {
29 m_dtAccumulator += dt;
30
31 DayZPlayer p;
32 Class.CastTo(p, m_weapon.GetHierarchyParent());
33 if(p)
34 {
35 HumanInputController hic = p.GetInputController();
36 HumanCommandWeapons hcw = p.GetCommandModifier_Weapons();
37
39 {
40 if (LogManager.IsWeaponLogEnable()) { wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " Unjammed!"); }
41 hcw.StartAction(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_END);
42 m_weapon.ProcessWeaponEvent(new WeaponEventUnjammingTimeout(p));
43 return; // unjammed successfuly
44 }
45
46
48 {
49 if (LogManager.IsWeaponLogEnable()) { wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " Unjamming..."); }
50 }
51 #ifndef PLATFORM_CONSOLE
52 #ifndef SERVER_FOR_CONSOLE
53 else
54 {
55 if (LogManager.IsWeaponLogEnable()) { wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " Unjamming failed, weapon still jammed"); }
56 hcw.StartAction(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_INTERRUPT);
57 m_weapon.ProcessWeaponEvent(new WeaponEventUnjammingFailedTimeout(p));
58 }
59 #endif
60 #endif
61 }
62 }
void wpnDebugPrint(string s)
Определения Debug.c:9
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
Определения Guards.c:604
proto native bool StartAction(WeaponActions pAction, int pActionType)
start reload,mechanism,chambering,unjam ...
proto native bool IsReloadOrMechanismContinuousUse()
R - reloading / bolting - long press (== true for multiple ticks)
float m_dtAccumulator
Определения WeaponFire.c:4
float m_jamTime
Определения WeaponUnjamming.c:14
class LOD Object
WeaponActions
actions
Определения human.c:816
WeaponActionUnjammingTypes
Определения human.c:912
void HumanCommandWeapons()
Определения human.c:1113

Перекрестные ссылки Class::CastTo(), HumanInputController::IsReloadOrMechanismContinuousUse(), LogManager::IsWeaponLogEnable(), m_dtAccumulator, m_jamTime, m_weapon, HumanCommandWeapons::StartAction() и wpnDebugPrint().