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

Закрытые члены

override bool IsWaitingForActionFinish ()
 
override void OnEntry (WeaponEventBase e)
 
override void OnAbort (WeaponEventBase e)
 
override void OnExit (WeaponEventBase e)
 
override void OnEntry (WeaponEventBase e)
 
override void OnAbort (WeaponEventBase e)
 
override void OnExit (WeaponEventBase e)
 

Подробное описание

Методы

◆ IsWaitingForActionFinish()

override bool IsWaitingForActionFinish ( )
inlineprivate
87{ return true; }

◆ OnAbort() [1/2]

override void OnAbort ( WeaponEventBase e)
inlineprivate
116 {
117 int mi = m_weapon.GetCurrentMuzzle();
118
119 string magazineTypeName;
120
121 if (m_magazineType.Length() > 0)
122 magazineTypeName = m_magazineType;
123 else
124 magazineTypeName = m_weapon.GetChamberAmmoTypeName(mi);
125
126 if ( GetGame().IsServer() )
127 {
128 if (DayZPlayerUtils.HandleDropCartridge(e.m_player, m_damage, m_type, magazineTypeName))
129 {
130 if (LogManager.IsWeaponLogEnable()) { wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge, ok - aborting, chambering cartridge dropped to ground"); }
131 }
132 else
133 Error("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge, error - cannot abort removal from wpn (of old mag)");
134 }
135
136 m_weapon.EffectBulletHide(mi);
137 m_weapon.SelectionBulletHide(); // force hide on abort
138
139 m_magazineType = string.Empty;
140 m_type = string.Empty;
141 super.OnAbort(e);
142 }
void wpnDebugPrint(string s)
Definition Debug.c:9
void DayZPlayerUtils()
cannot be instantiated
Definition DayZPlayerUtils.c:465
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
Definition Guards.c:604
Definition Debug.c:600
static bool IsWeaponLogEnable()
Definition Debug.c:724
Definition ObjectTyped.c:2
Definition EntityAI.c:95
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

Перекрестные ссылки DayZPlayerUtils(), Error(), GetGame(), LogManager::IsWeaponLogEnable(), m_weapon и wpnDebugPrint().

◆ OnAbort() [2/2]

override void OnAbort ( WeaponEventBase e)
inlineprivate
322 {
323 int mi = m_weapon.GetCurrentMuzzle();
324 string magazineTypeName;
325
326 if (m_magazineType.Length() > 0)
327 magazineTypeName = m_magazineType;
328 else
329 magazineTypeName = m_weapon.GetChamberAmmoTypeName(mi);
330
331 if ( !GetGame().IsMultiplayer() || GetGame().IsServer() )
332 {
333 if (DayZPlayerUtils.HandleDropCartridge(e.m_player, m_damage, m_type, magazineTypeName))
334 {
335 if (LogManager.IsWeaponLogEnable()) { wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge_InnerMag, ok - aborting, chambering cartridge dropped to ground"); }
336 }
337 else
338 Error("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge_InnerMag, error - cannot abort removal from wpn (of old mag)");
339 }
340
341 m_weapon.SelectionBulletHide(); // force hide on abort
342 m_weapon.EffectBulletHide(m_weapon.GetCurrentMuzzle());
343
344 m_magazineType = string.Empty;
345 m_type = string.Empty;
346 super.OnAbort(e);
347 }

Перекрестные ссылки DayZPlayerUtils(), Error(), GetGame(), LogManager::IsWeaponLogEnable(), m_weapon и wpnDebugPrint().

◆ OnEntry() [1/2]

override void OnEntry ( WeaponEventBase e)
inlineprivate
89 {
90 super.OnEntry(e);
91 if (e)
92 {
93 if (m_srcMagazine)
94 {
95 m_magazineType = m_srcMagazine.GetType();
96
97 if (m_srcMagazine.ServerAcquireCartridge(m_damage, m_type))
98 {
99 if (LogManager.IsWeaponLogEnable()) { wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge, ok - cartridge acquired: dmg=" + m_damage + " type=" + m_type); }
100 m_weapon.SelectionBulletShow();
101 m_weapon.ShowBullet(m_weapon.GetCurrentMuzzle());
102 m_weapon.EffectBulletShow( m_weapon.GetCurrentMuzzle(), m_damage, m_type);
103 m_weapon.SetWeaponOpen(false);
104 }
105 else
106 Error("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge, error - cannot take cartridge from magazine");
107 }
108 else
109 {
110 Error("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge, error - no magazine to load from (m_srcMagazine=NULL)");
111 }
112 }
113 }
Magazine m_srcMagazine
Definition WeaponChambering.c:634

Перекрестные ссылки Error(), LogManager::IsWeaponLogEnable(), m_srcMagazine, m_weapon и wpnDebugPrint().

◆ OnEntry() [2/2]

override void OnEntry ( WeaponEventBase e)
inlineprivate
296 {
297 super.OnEntry(e);
298 if (e)
299 {
300 if (m_srcMagazine)
301 {
302 m_magazineType = m_srcMagazine.GetType();
303
304 if (m_srcMagazine.ServerAcquireCartridge(m_damage, m_type))
305 {
306 if (LogManager.IsWeaponLogEnable()) { wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge_InnerMag, ok - cartridge acquired: dmg=" + m_damage + " type=" + m_type); }
307 }
308 else
309 Error("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge_InnerMag, error - cannot take cartridge from magazine");
310 }
311 else
312 {
313 Error("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge_InnerMag, error - no magazine to load from (m_srcMagazine=NULL)");
314 }
315
316 m_weapon.SelectionBulletShow();
317 m_weapon.EffectBulletShow(m_weapon.GetCurrentMuzzle(),m_damage,m_type);
318 }
319 }

Перекрестные ссылки Error(), LogManager::IsWeaponLogEnable(), m_srcMagazine, m_weapon и wpnDebugPrint().

◆ OnExit() [1/2]

override void OnExit ( WeaponEventBase e)
inlineprivate
145 {
146 int mi = m_weapon.GetCurrentMuzzle();
147 //if ( m_weapon.IsChamberFiredOut(mi) )
148 // m_weapon.EjectCasing(mi);
149 if (m_weapon.PushCartridgeToChamber(mi, m_damage, m_type))
150 {
151 if (LogManager.IsWeaponLogEnable()) { wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge, ok - loaded chamber"); }
152 }
153 else
154 if (LogManager.IsWeaponLogEnable()) { wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge, error - cannot load chamber chamber!"); }
155
156 m_weapon.SetCharged(true);
157 m_magazineType = string.Empty;
158 m_type = string.Empty;
159 super.OnExit(e);
160 }

Перекрестные ссылки LogManager::IsWeaponLogEnable(), m_weapon и wpnDebugPrint().

◆ OnExit() [2/2]

override void OnExit ( WeaponEventBase e)
inlineprivate
350 {
351 float ammoDamage;
352 string ammoTypeName;
353 int mi = m_weapon.GetCurrentMuzzle();
354 if (!m_weapon.IsInternalMagazineFull(mi))
355 {
356 if (m_weapon.PushCartridgeToInternalMagazine(mi, m_damage, m_type))
357 {
358 if (LogManager.IsWeaponLogEnable()) { wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge_InnerMag, ok - loaded chamber"); }
359 }
360 else
361 if (LogManager.IsWeaponLogEnable()) { wpnDebugPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " WeaponChambering_Cartridge_InnerMag, error - cannot load chamber chamber!"); }
362 }
363 m_magazineType = string.Empty;
364 super.OnExit(e);
365 }

Перекрестные ссылки LogManager::IsWeaponLogEnable(), m_weapon и wpnDebugPrint().


Объявления и описания членов класса находятся в файле: