Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс WeaponManager

Защищенные члены

void WeaponManager (PlayerBase player)
 
bool CanFire (Weapon_Base wpn)
 
bool CanAttachMagazine (Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
 
bool CanSwapMagazine (Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
 
bool CanDetachMagazine (Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
 
bool CanLoadBullet (Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
 
bool CanUnjam (Weapon_Base wpn, bool reservationCheck=true)
 
bool CanEjectBullet (Weapon_Base wpn, bool reservationCheck=true)
 
void SetEjectBulletTryTimestamp ()
 
bool InventoryReservation (Magazine mag, InventoryLocation invLoc)
 
bool AttachMagazine (Magazine mag, ActionBase control_action=NULL)
 
bool DetachMagazine (InventoryLocation invLoc, ActionBase control_action=NULL)
 
bool SwapMagazine (Magazine mag, ActionBase control_action=NULL)
 
bool SwapMagazineEx (Magazine mag, InventoryLocation invLoc, ActionBase control_action=NULL)
 
bool LoadBullet (Magazine mag, ActionBase control_action=NULL)
 
bool LoadMultiBullet (Magazine mag, ActionBase control_action=NULL)
 
void LoadMultiBulletStop ()
 
bool Unjam (ActionBase control_action=NULL)
 
bool EjectBullet (ActionBase control_action=NULL)
 
bool CanEjectBulletVerified ()
 
bool EjectBulletVerified (ActionBase control_action=NULL)
 
bool SetNextMuzzleMode ()
 
void Fire (Weapon_Base wpn)
 

Защищенные данные

PlayerBase m_player
 
int m_LastAcknowledgmentID
 
int m_PendingWeaponActionAcknowledgmentID
 
Magazine m_PendingTargetMagazine
 
ref InventoryLocation m_TargetInventoryLocation
 
int m_PendingWeaponAction
 
ref InventoryLocation m_PendingInventoryLocation
 
bool m_canEnd
 
bool m_justStart
 
bool m_InProgress
 
bool m_IsEventSended
 
bool m_WantContinue
 
bool m_InIronSight
 
bool m_InOptic
 
bool m_readyToStart
 
Weapon_Base m_WeaponInHand
 
MagazineStorage m_MagazineInHand
 
ActionBase m_ControlAction
 
int m_ForceEjectBulletTimestamp
 
const int FORCE_EJECT_BULLET_TIMEOUT = 2000
 
ref array< Magazinem_MagazinePilesInInventory
 
ref array< MagazineStorage > m_MagazineStorageInInventory
 
ref array< Magazinem_SuitableMagazines
 
Magazine m_PreparedMagazine
 
float m_NewJamChance
 
bool m_WaitToSyncJamChance
 
int m_AnimationRefreshCooldown
 

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

void Synchronize ()
 
void OnSyncJuncture (int pJunctureID, ParamsReadContext pCtx)
 
bool OnInputUserDataProcess (int userDataType, ParamsReadContext ctx)
 
bool StartAction (int action, Magazine mag, InventoryLocation il, ActionBase control_action=NULL)
 
void StartPendingAction ()
 
bool IsRunning ()
 
void SetRunning (bool value)
 
void Refresh ()
 
void Update (float deltaT)
 
void OnWeaponActionEnd ()
 
void DelayedRefreshAnimationState (int delay)
 
void RefreshAnimationState ()
 
bool WantContinue ()
 
Magazine GetPreparedMagazine ()
 
Magazine GetNextPreparedMagazine (out int startIdx)
 
void OnMagazineInventoryEnter (Magazine mag)
 
void OnMagazineInventoryExit (Magazine mag)
 
void OnMagazineAttach (Magazine mag)
 
void OnMagazineDetach (Magazine mag)
 
int CompareMagazinesSuitability (Magazine mag1, Magazine mag2)
 
void SortMagazineAfterLoad ()
 
void SetSutableMagazines ()
 
void OnLiftWeapon ()
 
string GetCurrentModeName ()
 
bool PrepareInventoryLocationForMagazineSwap (notnull Weapon_Base wpn, notnull Magazine new_mag, out InventoryLocation new_il)
 

Закрытые данные

const float MAX_DROP_MAGAZINE_DISTANCE_SQ = 4
 

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

Конструктор(ы)

◆ WeaponManager()

void WeaponManager ( PlayerBase player)
inlineprotected
46 {
57 m_InProgress = false;
58 m_WantContinue = true;
59 m_IsEventSended = false;
60 m_canEnd = false;
61 m_readyToStart = false;
63
64 m_NewJamChance = -1;
66
71
72#ifdef DEVELOPER
73 m_BurstOption = 0;
74#endif
75 }
Definition EntityAI.c:95
bool m_IsEventSended
Definition WeaponManager.c:18
int m_ForceEjectBulletTimestamp
Definition WeaponManager.c:26
int m_PendingWeaponActionAcknowledgmentID
Definition WeaponManager.c:9
Weapon_Base m_WeaponInHand
Definition WeaponManager.c:23
ref array< Magazine > m_SuitableMagazines
Definition WeaponManager.c:35
MagazineStorage m_MagazineInHand
Definition WeaponManager.c:24
bool m_WantContinue
Definition WeaponManager.c:19
ActionBase m_ControlAction
Definition WeaponManager.c:25
Magazine m_PreparedMagazine
Definition WeaponManager.c:36
int m_LastAcknowledgmentID
Definition WeaponManager.c:7
ref array< Magazine > m_MagazinePilesInInventory
Definition WeaponManager.c:33
Magazine m_PendingTargetMagazine
Definition WeaponManager.c:10
ref InventoryLocation m_PendingInventoryLocation
Definition WeaponManager.c:13
PlayerBase m_player
Definition WeaponManager.c:5
int m_PendingWeaponAction
Definition WeaponManager.c:12
bool m_readyToStart
Definition WeaponManager.c:22
float m_NewJamChance
Definition WeaponManager.c:39
bool m_canEnd
Definition WeaponManager.c:15
bool m_WaitToSyncJamChance
Definition WeaponManager.c:40
ref array< MagazineStorage > m_MagazineStorageInInventory
Definition WeaponManager.c:34
int m_AnimationRefreshCooldown
Definition WeaponManager.c:43
bool m_InProgress
Definition WeaponManager.c:17

Перекрестные ссылки m_AnimationRefreshCooldown, m_canEnd, m_ControlAction, m_ForceEjectBulletTimestamp, m_InProgress, m_IsEventSended, m_LastAcknowledgmentID, m_MagazineInHand, m_MagazinePilesInInventory, m_MagazineStorageInInventory, m_NewJamChance, m_PendingInventoryLocation, m_PendingTargetMagazine, m_PendingWeaponAction, m_PendingWeaponActionAcknowledgmentID, m_player, m_PreparedMagazine, m_readyToStart, m_SuitableMagazines, m_WaitToSyncJamChance, m_WantContinue и m_WeaponInHand.

Методы

◆ AttachMagazine()

bool AttachMagazine ( Magazine mag,
ActionBase control_action = NULL )
inlineprotected
342 {
344 }
const int AT_WPN_ATTACH_MAGAZINE
Definition _constants.c:10
bool StartAction(int action, Magazine mag, InventoryLocation il, ActionBase control_action=NULL)
Definition WeaponManager.c:714

Перекрестные ссылки AT_WPN_ATTACH_MAGAZINE и StartAction().

Используется в HandsContainer::OnPerformCombination().

◆ CanAttachMagazine()

bool CanAttachMagazine ( Weapon_Base wpn,
Magazine mag,
bool reservationCheck = true )
inlineprotected
93 {
94 if ( !wpn || !mag )
95 return false;
96
97 if ( m_player.GetHumanInventory().GetEntityInHands() != wpn )
98 return false;
99
100 if ( wpn.IsDamageDestroyed())
101 return false;
102
103 //if ( mag.GetHierarchyRootPlayer() && mag.GetHierarchyRootPlayer() != m_player )
104 //return false;
105
106 if( m_player.IsItemsToDelete())
107 return false;
108
109 if ( reservationCheck && (m_player.GetInventory().HasInventoryReservation(wpn, null) || m_player.GetInventory().HasInventoryReservation(mag, null)))
110 return false;
111
114
115 mag.GetInventory().GetCurrentInventoryLocation(invLoc);
117
118
119 //magazine is already in weapon
120 if ( Class.CastTo(wnp2, invLoc.GetParent()) )
121 return false;
122
123 int muzzleIndex = wpn.GetCurrentMuzzle();
124
125 if (wpn.CanAttachMagazine(muzzleIndex, mag))
126 return true;
127
128 return false;
129
130 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
InventoryLocation.
Definition InventoryLocation.c:28
shorthand
Definition BoltActionRifle_Base.c:6
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo() и m_player.

Используется в HandsContainer::OnPerformCombination().

◆ CanDetachMagazine()

bool CanDetachMagazine ( Weapon_Base wpn,
Magazine mag,
bool reservationCheck = true )
inlineprotected
182 {
183 if ( !wpn || !mag )
184 return false;
185
186 if ( m_player.GetHumanInventory().GetEntityInHands() != wpn )
187 return false;
188
189 if ( mag.GetHierarchyParent() != wpn )
190 return false;
191
192 if( m_player.IsItemsToDelete())
193 return false;
194
195 if ( reservationCheck && (m_player.GetInventory().HasInventoryReservation(wpn, null) || m_player.GetInventory().HasInventoryReservation(mag, null)))
196 return false;
197
198 return true;
199 }

Перекрестные ссылки m_player.

◆ CanEjectBullet()

bool CanEjectBullet ( Weapon_Base wpn,
bool reservationCheck = true )
inlineprotected
255 {
256 if( !wpn )
257 return false;
258
259 if( m_player.GetHumanInventory().GetEntityInHands() != wpn)
260 return false;
261
262 if( m_player.IsItemsToDelete())
263 return false;
264
265 if( reservationCheck && m_player.GetInventory().HasInventoryReservation(wpn, null))
266 return false;
267
268 if( !wpn.CanEjectBullet() )
269 return false;
270
271 if( wpn.IsJammed(/*wpn.GetCurrentMuzzle()*/) )
272 return false;
273
274 return true;
275 }

Перекрестные ссылки m_player.

◆ CanEjectBulletVerified()

bool CanEjectBulletVerified ( )
inlineprotected
392 {
393 int mi = m_WeaponInHand.GetCurrentMuzzle();
394 if( !m_WeaponInHand.IsChamberFiredOut(mi) && !m_WeaponInHand.IsChamberEmpty(mi) )
395 {
396 int actual_time = GetGame().GetTime();
398 {
399 return false;
400 }
401 }
402 return true;
403 }
const int FORCE_EJECT_BULLET_TIMEOUT
Definition WeaponManager.c:28
proto native CGame GetGame()

Перекрестные ссылки FORCE_EJECT_BULLET_TIMEOUT, GetGame(), m_ForceEjectBulletTimestamp и m_WeaponInHand.

◆ CanFire()

bool CanFire ( Weapon_Base wpn)
inlineprotected
80 {
81 if( m_player.GetHumanInventory().GetEntityInHands() != wpn )
82 return false;
83
84 if( m_player.IsLiftWeapon() || !m_player.IsRaised() || wpn.IsDamageDestroyed() || m_player.GetDayZPlayerInventory().IsProcessing() || !m_player.IsWeaponRaiseCompleted() || m_player.IsFighting() )
85 return false;
86
87 return true;
88
89 }

Перекрестные ссылки m_player.

◆ CanLoadBullet()

bool CanLoadBullet ( Weapon_Base wpn,
Magazine mag,
bool reservationCheck = true )
inlineprotected
202 {
203 if (!wpn || !mag)
204 return false;
205
206 if (m_player.GetHumanInventory().GetEntityInHands() != wpn)
207 return false;
208
209 if (mag.IsDamageDestroyed() || wpn.IsDamageDestroyed())
210 return false;
211
212 if (wpn.IsJammed())
213 return false;
214
215 if (m_player.IsItemsToDelete())
216 return false;
217
218 if (reservationCheck && (m_player.GetInventory().HasInventoryReservation(wpn, null) || m_player.GetInventory().HasInventoryReservation(mag, null)))
219 return false;
220
221 for (int i = 0; i < wpn.GetMuzzleCount(); i++)
222 {
223 if (wpn.CanChamberBullet(i, mag))
224 return true;
225 }
226
227 return false;
228 }

Перекрестные ссылки m_player.

◆ CanSwapMagazine()

bool CanSwapMagazine ( Weapon_Base wpn,
Magazine mag,
bool reservationCheck = true )
inlineprotected
134 {
135 if ( !wpn || !mag )
136 return false;
137
138 if ( m_player.GetHumanInventory().GetEntityInHands() != wpn )
139 return false;
140
141 if ( mag.IsDamageDestroyed() || wpn.IsDamageDestroyed())
142 return false;
143
144 //if ( mag.GetHierarchyRootPlayer() && mag.GetHierarchyRootPlayer() != m_player )
145 //return false;
146
147 if( m_player.IsItemsToDelete())
148 return false;
149
150 if ( reservationCheck && (m_player.GetInventory().HasInventoryReservation(wpn, null) || m_player.GetInventory().HasInventoryReservation(mag, null)))
151 return false;
152
153
156
157 mag.GetInventory().GetCurrentInventoryLocation(invLoc);
159
160 //second magazine is already in weapon
161 if( Class.CastTo(wnp2, invLoc.GetParent()) )
162 return false;
163
164 int muzzleIndex = wpn.GetCurrentMuzzle();
165
167 if( !Class.CastTo(mag2, wpn.GetMagazine(muzzleIndex)) )
168 return false;
169
171 return true;
172
174
176 return true;
177
178 return false;
179 }
script counterpart to engine's class Inventory
Definition Inventory.c:79
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
Definition Inventory.c:665
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
Definition Inventory.c:628

Перекрестные ссылки GameInventory::CanForceSwapEntitiesEx(), GameInventory::CanSwapEntitiesEx(), Class::CastTo() и m_player.

Используется в HandsContainer::GetCombinationFlags() и HandsContainer::OnPerformCombination().

◆ CanUnjam()

bool CanUnjam ( Weapon_Base wpn,
bool reservationCheck = true )
inlineprotected
231 {
232 if( !wpn )
233 return false;
234
235 if( m_player.GetHumanInventory().GetEntityInHands() != wpn)
236 return false;
237
238 if( wpn.IsDamageDestroyed())
239 return false;
240
241 if( m_player.IsItemsToDelete())
242 return false;
243
244 if ( reservationCheck && m_player.GetInventory().HasInventoryReservation(wpn, null))
245 return false;
246
247
248 if( !wpn.IsJammed(/*wpn.GetCurrentMuzzle()*/) )
249 return false;
250
251 return true;
252 }

Перекрестные ссылки m_player.

◆ CompareMagazinesSuitability()

int CompareMagazinesSuitability ( Magazine mag1,
Magazine mag2 )
inlineprivate
1139 {
1140 return mag1.GetAmmoCount() - mag2.GetAmmoCount();
1141 }

Используется в OnMagazineInventoryEnter().

◆ DelayedRefreshAnimationState()

void DelayedRefreshAnimationState ( int delay)
inlineprivate
985 {
987 {
988 if(delay == 0)
989 {
991 }
993 }
994 }
void RefreshAnimationState()
Definition WeaponManager.c:996

Перекрестные ссылки m_AnimationRefreshCooldown, m_WeaponInHand и RefreshAnimationState().

◆ DetachMagazine()

bool DetachMagazine ( InventoryLocation invLoc,
ActionBase control_action = NULL )
inlineprotected
347 {
349 }
const int AT_WPN_DETACH_MAGAZINE
Definition _constants.c:12

Перекрестные ссылки AT_WPN_DETACH_MAGAZINE и StartAction().

◆ EjectBullet()

bool EjectBullet ( ActionBase control_action = NULL)
inlineprotected
387 {
389 }
const int AT_WPN_EJECT_BULLET
Definition _constants.c:15

Перекрестные ссылки AT_WPN_EJECT_BULLET и StartAction().

◆ EjectBulletVerified()

bool EjectBulletVerified ( ActionBase control_action = NULL)
inlineprotected
406 {
407 if ( m_WeaponInHand )
408 {
409 int mi = m_WeaponInHand.GetCurrentMuzzle();
410 if ( !m_WeaponInHand.IsChamberFiredOut(mi) && !m_WeaponInHand.IsChamberEmpty(mi) )
411 {
414 }
415 else
416 {
418 }
419 }
420 return false;
421 }

Перекрестные ссылки AT_WPN_EJECT_BULLET, GetGame(), m_ForceEjectBulletTimestamp, m_WeaponInHand и StartAction().

◆ Fire()

void Fire ( Weapon_Base wpn)
inlineprotected
429 {
430 int mi = wpn.GetCurrentMuzzle();
431 if ( wpn.IsChamberFiredOut(mi) || wpn.IsJammed() || wpn.IsChamberEmpty(mi) )
432 {
433 wpn.ProcessWeaponEvent(new WeaponEventTrigger(m_player));
434 return;
435 }
436
437 if (wpn.JamCheck(0))
438 {
439 wpn.ProcessWeaponEvent(new WeaponEventTriggerToJam(m_player));
440 }
441 else
442 {
443 wpn.ProcessWeaponEvent(new WeaponEventTrigger(m_player));
444 }
445 }

Перекрестные ссылки m_player.

◆ GetCurrentModeName()

string GetCurrentModeName ( )
inlineprivate
1272 {
1273 if( m_WeaponInHand )
1274 {
1275 int mi = m_WeaponInHand.GetCurrentMuzzle();
1276 return m_WeaponInHand.GetCurrentModeName(mi);
1277 }
1278 return "";
1279 }

Перекрестные ссылки m_WeaponInHand.

Используется в ScriptedWidgetEventHandler::SetWeaponModeAndZeroing().

◆ GetNextPreparedMagazine()

Magazine GetNextPreparedMagazine ( out int startIdx)
inlineprivate
1038 {
1039 int count = m_SuitableMagazines.Count();
1040 Magazine mag;
1041 for (int i = startIdx; i < count; i++)
1042 {
1044 if (mag && mag.GetAmmoCount() > 0 && (!mag.GetHierarchyParent() || mag.GetHierarchyParent().GetInventory().AreChildrenAccessible()))
1045 {
1046 startIdx = i;
1047 return m_SuitableMagazines.Get(i);
1048 }
1049 }
1050 return null;
1051 }

Перекрестные ссылки m_SuitableMagazines.

◆ GetPreparedMagazine()

Magazine GetPreparedMagazine ( )
inlineprivate
1019 {
1020 Magazine mag;
1021 for (int i = 0; i < m_SuitableMagazines.Count(); i++)
1022 {
1024 if (!mag || mag.IsRuined() || (mag.GetHierarchyParent() && !mag.GetHierarchyParent().GetInventory().AreChildrenAccessible()))
1025 {
1026 m_SuitableMagazines.Remove(i);
1027 i--;
1028 continue;
1029 }
1030 if (mag.GetAmmoCount() > 0)
1031 return mag;
1032 }
1033
1034 return null;
1035 }

Перекрестные ссылки m_SuitableMagazines.

◆ InventoryReservation()

bool InventoryReservation ( Magazine mag,
InventoryLocation invLoc )
inlineprotected
283 {
286 if (Weapon_Base.CastTo(weapon, m_player.GetItemInHands()) )
287 {
288 weapon.GetInventory().GetCurrentInventoryLocation(ilWeapon);
289 if ( m_player.GetInventory().HasInventoryReservation(weapon, ilWeapon) )
290 {
291 return false;
292 }
293 else
294 {
295 m_player.GetInventory().AddInventoryReservationEx(weapon,ilWeapon,GameInventory.c_InventoryReservationTimeoutMS);
296 }
297 }
298
299 if( invLoc )
300 {
301 if ( m_player.GetInventory().HasInventoryReservation(invLoc.GetItem(),invLoc) )
302 {
303 m_player.GetInventory().ClearInventoryReservationEx(weapon, ilWeapon);
304 return false;
305 }
306 else
307 {
308 m_player.GetInventory().AddInventoryReservationEx(invLoc.GetItem(),invLoc,GameInventory.c_InventoryReservationTimeoutMS);
309 }
310 }
311
312 if( mag )
313 {
316
317 if ( m_player.GetInventory().HasInventoryReservation(mag, m_TargetInventoryLocation) )
318 //if ( !m_player.GetInventory().AddInventoryReservationEx( mag, m_TargetInventoryLocation, GameInventory.c_InventoryReservationTimeoutMS) )
319 {
320 m_player.GetInventory().ClearInventoryReservationEx(weapon, ilWeapon);
321 if (invLoc)
322 {
323 m_player.GetInventory().ClearInventoryReservationEx(invLoc.GetItem(), invLoc);
324 }
325 return false;
326 }
327 else
328 {
329 m_player.GetInventory().AddInventoryReservationEx(mag, m_TargetInventoryLocation, GameInventory.c_InventoryReservationTimeoutMS);
330 }
331 }
334
335 return true;
336 }
const int c_InventoryReservationTimeoutMS
reservations
Definition Inventory.c:713
provides access to slot configuration
Definition InventorySlots.c:6
ref InventoryLocation m_TargetInventoryLocation
Definition WeaponManager.c:11

Перекрестные ссылки GameInventory::c_InventoryReservationTimeoutMS, m_PendingInventoryLocation, m_PendingTargetMagazine, m_player, m_TargetInventoryLocation и m_WeaponInHand.

Используется в StartAction().

◆ IsRunning()

bool IsRunning ( )
inlineprivate
817 {
818 return m_InProgress;
819 }

Перекрестные ссылки m_InProgress.

Используется в ActionPossibilityCheck() и CanPlayEmote().

◆ LoadBullet()

bool LoadBullet ( Magazine mag,
ActionBase control_action = NULL )
inlineprotected
367 {
369 }
const int AT_WPN_LOAD_BULLET
Definition _constants.c:13

Перекрестные ссылки AT_WPN_LOAD_BULLET и StartAction().

Используется в HandsContainer::OnPerformCombination().

◆ LoadMultiBullet()

bool LoadMultiBullet ( Magazine mag,
ActionBase control_action = NULL )
inlineprotected
372 {
374 }
const int AT_WPN_LOAD_MULTI_BULLETS_START
Definition _constants.c:16

Перекрестные ссылки AT_WPN_LOAD_MULTI_BULLETS_START и StartAction().

◆ LoadMultiBulletStop()

void LoadMultiBulletStop ( )
inlineprotected
377 {
378 if(m_InProgress) m_WantContinue = false;
379 }

Перекрестные ссылки m_InProgress и m_WantContinue.

◆ OnInputUserDataProcess()

bool OnInputUserDataProcess ( int userDataType,
ParamsReadContext ctx )
inlineprivate
573 {
575 int mi;
577 int slotID;
578 bool accepted = false;
580 {
581 if (!ctx.Read(m_PendingWeaponAction))
582 return false;
583
585 return false;
586
588 {
589 GetGame().ClearJuncture(m_player, m_PendingTargetMagazine);
591 }
592 m_InProgress = true;
593 m_IsEventSended = false;
594 Magazine mag = NULL;
595
596 Weapon_Base.CastTo( wpn, m_player.GetItemInHands() );
597 if ( wpn )
598 mi = wpn.GetCurrentMuzzle();
599
600 switch (m_PendingWeaponAction)
601 {
603 {
604 if ( !ctx.Read(mag) )
605 break;
606
607 if ( !mag || !wpn )
608 break;
609
610 slotID = wpn.GetSlotFromMuzzleIndex(mi);
611 il = new InventoryLocation();
612 il.SetAttachment(wpn,mag,slotID);
613 if( GetGame().AddInventoryJunctureEx(m_player, mag, il, false, 10000) )
614 accepted = true;
615
617 break;
618 }
620 {
621 if ( !ctx.Read(mag) )
622 break;
623
624 il = new InventoryLocation();
625 if (!il.ReadFromContext(ctx))
626 break;
627
628 if ( !mag || !wpn )
629 break;
630
631 if ( !wpn.GetMagazine(mi) )
632 break;
633
634 if ( GetGame().AddActionJuncture(m_player,mag,10000) )
635 accepted = true;
638
639 break;
640 }
642 {
643 il = new InventoryLocation();
644 if ( !il.ReadFromContext(ctx) )
645 break;
646
647 if ( !il.IsValid() )
648 break;
649
650 if ( !wpn )
651 break;
652
653 Magazine det_mag = wpn.GetMagazine(mi);
654 mag = Magazine.Cast(il.GetItem());
655 if ( !det_mag || ( mag != det_mag) )
656 break;
657
658 if( GetGame().AddInventoryJunctureEx(m_player, il.GetItem(), il, true, 10000))
659 accepted = true;
662 break;
663 }
665 {
666 ctx.Read(mag);
667
668 if ( !mag )
669 break;
670
671 if( GetGame().AddActionJuncture(m_player,mag,10000) )
672 accepted = true;
674 break;
675 }
677 {
678 ctx.Read(mag);
679
680 if ( !mag )
681 break;
682
683 if( GetGame().AddActionJuncture(m_player,mag,10000) )
684 accepted = true;
686 break;
687 }
688 case AT_WPN_UNJAM:
689 {
690 accepted = true;
691 //Unjam();
692 break;
693 }
695 {
696 accepted = true;
697 break;
698 }
700 {
701 accepted = true;
702 break;
703 }
704 default:
705 Error("unknown actionID=" + m_PendingWeaponAction);
706 break;
707 }
709 }
710
711 return accepted;
712 }
const int INPUT_UDT_WEAPON_ACTION
Definition _constants.c:7
const int AT_WPN_UNJAM
Definition _constants.c:14
const int AT_WPN_SWAP_MAGAZINE
Definition _constants.c:11
const int AT_WPN_SET_NEXT_MUZZLE_MODE
Definition _constants.c:18
Definition DayZPlayerSyncJunctures.c:5
static void SendWeaponActionAcknowledgment(DayZPlayer pPlayer, int AckID, bool accept)
Definition DayZPlayerSyncJunctures.c:290
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

Перекрестные ссылки AT_WPN_ATTACH_MAGAZINE, AT_WPN_DETACH_MAGAZINE, AT_WPN_EJECT_BULLET, AT_WPN_LOAD_BULLET, AT_WPN_LOAD_MULTI_BULLETS_START, AT_WPN_SET_NEXT_MUZZLE_MODE, AT_WPN_SWAP_MAGAZINE, AT_WPN_UNJAM, Error(), GetGame(), INPUT_UDT_WEAPON_ACTION, m_InProgress, m_IsEventSended, m_PendingInventoryLocation, m_PendingTargetMagazine, m_PendingWeaponAction, m_PendingWeaponActionAcknowledgmentID, m_player и DayZPlayerSyncJunctures::SendWeaponActionAcknowledgment().

◆ OnLiftWeapon()

void OnLiftWeapon ( )
inlineprivate
1266 {
1267 if( m_WeaponInHand )
1268 m_WeaponInHand.ResetBurstCount();
1269 }

Перекрестные ссылки m_WeaponInHand.

◆ OnMagazineAttach()

void OnMagazineAttach ( Magazine mag)
inlineprivate
1129 {
1131 }
void OnMagazineInventoryExit(Magazine mag)
Definition WeaponManager.c:1111

Перекрестные ссылки OnMagazineInventoryExit().

◆ OnMagazineDetach()

void OnMagazineDetach ( Magazine mag)
inlineprivate
1134 {
1136 }
void OnMagazineInventoryEnter(Magazine mag)
Definition WeaponManager.c:1053

Перекрестные ссылки OnMagazineInventoryEnter().

◆ OnMagazineInventoryEnter()

void OnMagazineInventoryEnter ( Magazine mag)
inlineprivate
1054 {
1055 if (mag)
1056 {
1057 Weapon_Base weapon = Weapon_Base.Cast(mag.GetHierarchyParent());
1058
1059 if (weapon)
1060 return;
1061 }
1062
1063 int i;
1064 MagazineStorage sMag = MagazineStorage.Cast(mag);
1065 if(sMag)
1066 {
1067 for(i = 0; i < m_MagazineStorageInInventory.Count(); i++ )
1068 {
1069 MagazineStorage s_mag_i = m_MagazineStorageInInventory[i];
1070 if(!s_mag_i)
1071 {
1072 m_MagazineStorageInInventory.RemoveOrdered(i);
1073 i--;
1074 continue;
1075 }
1076
1078 break;
1079 }
1081
1082 SetSutableMagazines(); //TODO optimalize
1083 return;
1084 }
1085
1086 if(mag)
1087 {
1088
1089 for(i = 0; i < m_MagazinePilesInInventory.Count(); i++ )
1090 {
1092 if(!mag_i)
1093 {
1094 m_MagazinePilesInInventory.RemoveOrdered(i);
1095 i--;
1096 continue;
1097 }
1098
1099
1101 {
1102 break;
1103 }
1104 }
1106 SetSutableMagazines(); //TODO optimalize
1107 }
1108
1109 }
void SetSutableMagazines()
Definition WeaponManager.c:1204
int CompareMagazinesSuitability(Magazine mag1, Magazine mag2)
Definition WeaponManager.c:1138

Перекрестные ссылки CompareMagazinesSuitability(), m_MagazinePilesInInventory, m_MagazineStorageInInventory и SetSutableMagazines().

Используется в OnMagazineDetach().

◆ OnMagazineInventoryExit()

void OnMagazineInventoryExit ( Magazine mag)
inlineprivate
1112 {
1113 m_SuitableMagazines.RemoveItem(mag);
1114
1115 MagazineStorage sMag = MagazineStorage.Cast(mag);
1116 if(sMag)
1117 {
1119 return;
1120 }
1121
1122 if(mag)
1123 {
1124 m_MagazinePilesInInventory.RemoveItem(mag);
1125 }
1126 }

Перекрестные ссылки m_MagazinePilesInInventory, m_MagazineStorageInInventory и m_SuitableMagazines.

Используется в OnMagazineAttach().

◆ OnSyncJuncture()

void OnSyncJuncture ( int pJunctureID,
ParamsReadContext pCtx )
inlineprivate
523 {
525 {
526 pCtx.Read(m_NewJamChance);
527 }
528 else
529 {
533 {
535 {
536 m_readyToStart = true;
537 }
539 {
540 if(m_PendingWeaponAction >= 0 )
541 {
542 if(!(GetGame().IsServer() && GetGame().IsMultiplayer()))
543 {
545 ItemBase weapon = m_player.GetItemInHands();
546 weapon.GetInventory().GetCurrentInventoryLocation(ilWeapon);
547 m_player.GetInventory().ClearInventoryReservationEx(m_player.GetItemInHands(),ilWeapon);
548
550 {
551 m_PendingTargetMagazine.GetInventory().ClearInventoryReservationEx(m_PendingTargetMagazine, m_TargetInventoryLocation );
552 }
553
555 {
556 m_player.GetInventory().ClearInventoryReservationEx( NULL, m_PendingInventoryLocation );
557 }
558 }
563 m_InProgress = false;
564 }
565 }
566 }
567 }
568 }
static const int SJ_WEAPON_ACTION_ACK_REJECT
Definition DayZPlayerSyncJunctures.c:15
static const int SJ_WEAPON_ACTION_ACK_ACCEPT
Definition DayZPlayerSyncJunctures.c:14
static const int SJ_WEAPON_SET_JAMMING_CHANCE
Definition DayZPlayerSyncJunctures.c:16
Definition InventoryItem.c:731

Перекрестные ссылки GetGame(), m_InProgress, m_NewJamChance, m_PendingInventoryLocation, m_PendingTargetMagazine, m_PendingWeaponAction, m_PendingWeaponActionAcknowledgmentID, m_player, m_readyToStart, m_TargetInventoryLocation, DayZPlayerSyncJunctures::SJ_WEAPON_ACTION_ACK_ACCEPT, DayZPlayerSyncJunctures::SJ_WEAPON_ACTION_ACK_REJECT и DayZPlayerSyncJunctures::SJ_WEAPON_SET_JAMMING_CHANCE.

◆ OnWeaponActionEnd()

void OnWeaponActionEnd ( )
inlineprivate
940 {
941 if ( !m_InProgress )
942 return;
943
944 if (!m_ControlAction)
945 {
946 if(GetGame().IsServer() && GetGame().IsMultiplayer())
947 {
949 {
951 }
952 }
953 else
954 {
956 il.SetHands(m_player,m_player.GetItemInHands());
957 m_player.GetInventory().ClearInventoryReservationEx(m_player.GetItemInHands(),il);
958
960 {
961 m_player.GetInventory().ClearInventoryReservationEx(m_PendingTargetMagazine, m_TargetInventoryLocation );
962 }
963
965 {
966 m_player.GetInventory().ClearInventoryReservationEx( m_PendingInventoryLocation.GetItem(), m_PendingInventoryLocation );
967 }
968 }
969 }
970
977 //m_WeaponInHand = NULL;
978 m_InProgress = false;
979 m_readyToStart = false;
980 m_WantContinue = true;
981
982 }

Перекрестные ссылки GetGame(), m_ControlAction, m_InProgress, m_PendingInventoryLocation, m_PendingTargetMagazine, m_PendingWeaponAction, m_PendingWeaponActionAcknowledgmentID, m_player, m_readyToStart, m_TargetInventoryLocation и m_WantContinue.

Используется в Refresh(), StartPendingAction() и Update().

◆ PrepareInventoryLocationForMagazineSwap()

bool PrepareInventoryLocationForMagazineSwap ( notnull Weapon_Base wpn,
notnull Magazine new_mag,
out InventoryLocation new_il )
inlineprivate
1282 {
1283 int muzzleIndex = wpn.GetCurrentMuzzle();
1284 Magazine old_mag = Magazine.Cast(wpn.GetMagazine(muzzleIndex));
1286
1287 if (old_mag)
1288 {
1290 if ( result )
1291 {
1292 new_mag.GetInventory().GetCurrentInventoryLocation(new_il);
1293 new_il.SetItem(old_mag);
1294 }
1295 else
1296 {
1298 float dir[4];
1299 if ( !result )
1300 {
1301 new_il.SetGroundEx( old_mag, m_player.GetPosition(), dir);
1302 }
1303 }
1304 }
1305 return true;
1306 }

Перекрестные ссылки GameInventory::CanForceSwapEntitiesEx(), GameInventory::CanSwapEntitiesEx() и m_player.

Используется в SwapMagazine().

◆ Refresh()

void Refresh ( )
inlineprivate
827 {
829 }
void OnWeaponActionEnd()
Definition WeaponManager.c:939

Перекрестные ссылки OnWeaponActionEnd().

◆ RefreshAnimationState()

void RefreshAnimationState ( )
inlineprivate
997 {
999 {
1000 WeaponStableState state = WeaponStableState.Cast( m_WeaponInHand.GetCurrentState() );
1001
1002 if (state)
1003 {
1004 HumanCommandWeapons hcw = m_player.GetCommandModifier_Weapons();
1005 if (hcw)
1006 {
1007 hcw.SetInitState(state.m_animState);
1008 }
1009 }
1010 }
1011 }
Definition human.c:987
represents weapon's stable state (i.e. the basic states that the weapon will spend the most time in)
Definition Crossbow.c:27

Перекрестные ссылки m_player и m_WeaponInHand.

Используется в DelayedRefreshAnimationState() и Update().

◆ SetEjectBulletTryTimestamp()

void SetEjectBulletTryTimestamp ( )
inlineprotected
278 {
280 }

Перекрестные ссылки GetGame() и m_ForceEjectBulletTimestamp.

◆ SetNextMuzzleMode()

bool SetNextMuzzleMode ( )
inlineprotected
424 {
426 }

Перекрестные ссылки AT_WPN_SET_NEXT_MUZZLE_MODE и StartAction().

◆ SetRunning()

void SetRunning ( bool value)
inlineprivate
822 {
824 }

Перекрестные ссылки m_InProgress.

◆ SetSutableMagazines()

void SetSutableMagazines ( )
inlineprivate
1205 {
1206 m_SuitableMagazines.Clear();
1207 int i;
1208
1209 if (m_WeaponInHand)
1210 {
1211 int mi = m_WeaponInHand.GetCurrentMuzzle();
1212
1213 for (i = 0; i < m_MagazineStorageInInventory.Count(); i++ )
1214 {
1215 MagazineStorage s_mag = m_MagazineStorageInInventory[i];
1216
1217 if (!s_mag)
1218 {
1219 m_MagazineStorageInInventory.RemoveOrdered(i);
1220 i--;
1221 continue;
1222 }
1223
1224 if ( m_WeaponInHand.TestAttachMagazine(mi, s_mag, false, true))
1225 m_SuitableMagazines.Insert(s_mag);
1226 }
1227
1228 for (i = 0; i < m_MagazinePilesInInventory.Count(); i++ )
1229 {
1231 if (!mag)
1232 {
1233 m_MagazinePilesInInventory.RemoveOrdered(i);
1234 i--;
1235 continue;
1236 }
1237
1238 if (m_WeaponInHand.CanChamberFromMag(mi, mag))
1239 m_SuitableMagazines.Insert(mag);
1240 }
1241//TODO m_MagazineStorageInInventory and m_MagazinePilesInInventory always sort
1242 }
1243 else if (m_MagazineInHand)
1244 {
1245 for (i = 0; i < m_MagazinePilesInInventory.Count(); i++ )
1246 {
1248 if (!m_mag)
1249 {
1250 m_MagazinePilesInInventory.RemoveOrdered(i);
1251 i--;
1252 continue;
1253 }
1254 if (m_MagazineInHand.IsCompatiableAmmo( m_mag ))
1255 m_SuitableMagazines.Insert(m_mag);
1256 }
1257 }
1258 else
1259 {
1261 }
1262
1263 }

Перекрестные ссылки m_MagazineInHand, m_MagazinePilesInInventory, m_MagazineStorageInInventory, m_PreparedMagazine, m_SuitableMagazines и m_WeaponInHand.

Используется в OnMagazineInventoryEnter(), SortMagazineAfterLoad() и Update().

◆ SortMagazineAfterLoad()

void SortMagazineAfterLoad ( )
inlineprivate
1144 {
1147 int low_mag1, high_mag1;
1148 int low_mag2, high_mag2;
1149 int i, j;
1150
1151 for(i = 0; i < m_MagazineStorageInInventory.Count(); i++ )
1152 {
1153 MagazineStorage mag = m_MagazineStorageInInventory.Get(i);
1154 mag.GetNetworkID(low_mag1,high_mag1);
1155 for( j = 0; j < magazines.Count(); j++)
1156 {
1157 magazines.Get(j).GetNetworkID(low_mag2,high_mag2);
1158 if(low_mag1 > low_mag2)
1159 {
1160 break;
1161 }
1162 else if (low_mag1 == low_mag2)
1163 {
1164 if( high_mag1 > high_mag2 )
1165 {
1166 break;
1167 }
1168 }
1169 }
1170 magazines.InsertAt(mag,j);
1171 }
1172
1175
1176 for(i = 0; i < m_MagazinePilesInInventory.Count(); i++ )
1177 {
1179 pile.GetNetworkID(low_mag1,high_mag1);
1180 for( j = 0; j < magazines_piles.Count(); j++)
1181 {
1182 magazines_piles.Get(j).GetNetworkID(low_mag2,high_mag2);
1183 if(low_mag1 > low_mag2)
1184 {
1185 break;
1186 }
1187 else if (low_mag1 == low_mag2)
1188 {
1189 if( high_mag1 > high_mag2 )
1190 {
1191 break;
1192 }
1193 }
1194 }
1195 magazines_piles.InsertAt(pile,j);
1196 }
1197
1200
1202 }

Перекрестные ссылки m_MagazinePilesInInventory, m_MagazineStorageInInventory и SetSutableMagazines().

◆ StartAction()

bool StartAction ( int action,
Magazine mag,
InventoryLocation il,
ActionBase control_action = NULL )
inlineprivate
715 {
716 //if it is controled by action inventory reservation and synchronization provide action itself
718 {
719 m_ControlAction = ActionBase.Cast(control_action);
721 m_InProgress = true;
722 m_IsEventSended = false;
726
727 return true;
728 }
729
730
731 if (GetGame().IsMultiplayer() && GetGame().IsServer())
732 return false;
733
735 return false;
736 if ( !InventoryReservation(mag, il) )
737 return false;
738
740 m_InProgress = true;
741 m_IsEventSended = false;
742
743 if ( !GetGame().IsMultiplayer() )
744 m_readyToStart = true;
745 else
746 Synchronize();
747
748 return true;
749 }
Definition gameplay.c:121
proto static native bool CanStoreInputUserData()
void Synchronize()
Definition WeaponManager.c:463
bool InventoryReservation(Magazine mag, InventoryLocation invLoc)
Definition WeaponManager.c:282
void StartPendingAction()
Definition WeaponManager.c:751

Перекрестные ссылки ScriptInputUserData::CanStoreInputUserData(), GetGame(), InventoryReservation(), m_ControlAction, m_InProgress, m_IsEventSended, m_PendingInventoryLocation, m_PendingTargetMagazine, m_PendingWeaponAction, m_readyToStart, StartPendingAction() и Synchronize().

Используется в AttachMagazine(), DetachMagazine(), EjectBullet(), EjectBulletVerified(), LoadBullet(), LoadMultiBullet(), SetNextMuzzleMode(), SwapMagazine(), SwapMagazineEx() и Unjam().

◆ StartPendingAction()

void StartPendingAction ( )
inlineprivate
752 {
753 m_WeaponInHand = Weapon_Base.Cast(m_player.GetItemInHands());
754 if(!m_WeaponInHand)
755 {
757 return;
758 }
759 switch (m_PendingWeaponAction)
760 {
762 {
763 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventAttachMagazine(m_player, m_PendingTargetMagazine) );
764 break;
765 }
767 {
768 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventSwapMagazine(m_player, m_PendingTargetMagazine, m_PendingInventoryLocation) );
769 break;
770 }
772 {
774 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventDetachMagazine(m_player, mag, m_PendingInventoryLocation) );
775 break;
776 }
778 {
779 m_WantContinue = false;
780 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventLoad1Bullet(m_player, m_PendingTargetMagazine) );
781 break;
782 }
784 {
785 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventLoad1Bullet(m_player, m_PendingTargetMagazine) );
786 break;
787 }
789 {
790 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventContinuousLoadBulletEnd(m_player) );
791 break;
792 }
793 case AT_WPN_UNJAM:
794 {
795 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventUnjam(m_player, NULL) );
796 break;
797 }
799 {
800 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventMechanism(m_player, NULL) );
801 break;
802 }
804 {
805 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventSetNextMuzzleMode(m_player, NULL) );
806 break;
807 }
808 default:
809 m_InProgress = false;
810 Error("unknown actionID=" + m_PendingWeaponAction);
811 }
812 m_IsEventSended = true;
813 m_canEnd = false;
814 }
const int AT_WPN_LOAD_MULTI_BULLETS_END
Definition _constants.c:17

Перекрестные ссылки AT_WPN_ATTACH_MAGAZINE, AT_WPN_DETACH_MAGAZINE, AT_WPN_EJECT_BULLET, AT_WPN_LOAD_BULLET, AT_WPN_LOAD_MULTI_BULLETS_END, AT_WPN_LOAD_MULTI_BULLETS_START, AT_WPN_SET_NEXT_MUZZLE_MODE, AT_WPN_SWAP_MAGAZINE, AT_WPN_UNJAM, Error(), m_canEnd, m_InProgress, m_IsEventSended, m_PendingInventoryLocation, m_PendingTargetMagazine, m_PendingWeaponAction, m_player, m_WantContinue, m_WeaponInHand и OnWeaponActionEnd().

Используется в StartAction() и Update().

◆ SwapMagazine()

bool SwapMagazine ( Magazine mag,
ActionBase control_action = NULL )
inlineprotected
352 {
355 {
357 }
358 return false;
359 }
bool PrepareInventoryLocationForMagazineSwap(notnull Weapon_Base wpn, notnull Magazine new_mag, out InventoryLocation new_il)
Definition WeaponManager.c:1281

Перекрестные ссылки AT_WPN_SWAP_MAGAZINE, m_WeaponInHand, PrepareInventoryLocationForMagazineSwap() и StartAction().

Используется в HandsContainer::OnPerformCombination().

◆ SwapMagazineEx()

bool SwapMagazineEx ( Magazine mag,
InventoryLocation invLoc,
ActionBase control_action = NULL )
inlineprotected

Перекрестные ссылки AT_WPN_SWAP_MAGAZINE и StartAction().

◆ Synchronize()

void Synchronize ( )
inlineprivate
464 {
465 if ( GetGame().IsClient() )
466 {
469
473
474
475 switch (m_PendingWeaponAction)
476 {
478 {
480 break;
481 }
483 {
485 m_PendingInventoryLocation.WriteToContext(ctx);
486 break;
487 }
489 {
490 m_PendingInventoryLocation.WriteToContext(ctx);
491 break;
492 }
494 {
496 break;
497 }
499 {
501 break;
502 }
503 case AT_WPN_UNJAM:
504 {
505 break;
506 }
508 {
509 break;
510 }
511 default:
512 break;
513 }
514 ctx.Send();
515 //if( !m_player.GetDayZPlayerInventory().HasLockedHands() )
516 // m_player.GetDayZPlayerInventory().LockHands();
517 }
518 }

Перекрестные ссылки AT_WPN_ATTACH_MAGAZINE, AT_WPN_DETACH_MAGAZINE, AT_WPN_EJECT_BULLET, AT_WPN_LOAD_BULLET, AT_WPN_LOAD_MULTI_BULLETS_START, AT_WPN_SWAP_MAGAZINE, AT_WPN_UNJAM, GetGame(), INPUT_UDT_WEAPON_ACTION, m_LastAcknowledgmentID, m_PendingInventoryLocation, m_PendingTargetMagazine, m_PendingWeaponAction и m_PendingWeaponActionAcknowledgmentID.

Используется в StartAction().

◆ Unjam()

bool Unjam ( ActionBase control_action = NULL)
inlineprotected
382 {
384 }

Перекрестные ссылки AT_WPN_UNJAM и StartAction().

◆ Update()

void Update ( float deltaT)
inlineprivate
832 {
833 if (m_WeaponInHand != m_player.GetItemInHands())
834 {
835 if( m_WeaponInHand )
836 {
837 m_SuitableMagazines.Clear();
839 }
840 m_WeaponInHand = Weapon_Base.Cast(m_player.GetItemInHands());
841 if ( m_WeaponInHand )
842 {
844 //SET new magazine
846 m_WeaponInHand.SetSyncJammingChance(0);
847 }
849 }
850
851 if (m_WeaponInHand)
852 {
854 {
856
858 {
860 }
861 }
862
863 if (!GetGame().IsMultiplayer())
864 {
865 m_WeaponInHand.SetSyncJammingChance(m_WeaponInHand.GetChanceToJam());
866 }
867 else
868 {
869 if ( m_NewJamChance >= 0)
870 {
871 m_WeaponInHand.SetSyncJammingChance(m_NewJamChance);
872 m_NewJamChance = -1;
873 m_WaitToSyncJamChance = false;
874 }
875 if (GetGame().IsServer() && !m_WaitToSyncJamChance )
876 {
879 if ( Math.AbsFloat(m_WeaponInHand.GetSyncChanceToJam() - m_WeaponInHand.GetChanceToJam()) > 0.001 )
880 {
883 }
884 }
885 }
886
888 {
890 m_readyToStart = false;
891 return;
892 }
893
895 return;
896
897 if(m_canEnd)
898 {
899 if(m_WeaponInHand.IsIdle())
900 {
902 }
903 else if(m_justStart)
904 {
905 m_InIronSight = m_player.IsInIronsights();
906 m_InOptic = m_player.IsInOptics();
907
909 {
910 //'RequestResetADSSync' can be called here, if ADS reset is desired
911 m_player.ExitSights();
912 }
913
914 m_justStart = false;
915 }
916
917 }
918 else
919 {
920 m_canEnd = true;
921 m_justStart = true;
922 }
923 }
924 else
925 {
926 if ( m_MagazineInHand != m_player.GetItemInHands() )
927 {
928 m_MagazineInHand = MagazineStorage.Cast(m_player.GetItemInHands());
929 if ( m_MagazineInHand )
930 {
932 }
933 }
934
935
936 }
937 }
static void SendWeaponJamChance(DayZPlayer pPlayer, float jamChance)
Definition DayZPlayerSyncJunctures.c:334
Definition EnMath.c:7
override float GetChanceToJam()
Definition BoltActionRifle_Base.c:7
bool m_InIronSight
Definition WeaponManager.c:20
bool m_InOptic
Definition WeaponManager.c:21
bool m_justStart
Definition WeaponManager.c:16
static proto float AbsFloat(float f)
Returns absolute value.

Перекрестные ссылки Math::AbsFloat(), Weapon_Base::GetChanceToJam(), GetGame(), m_AnimationRefreshCooldown, m_canEnd, m_InIronSight, m_InOptic, m_InProgress, m_IsEventSended, m_justStart, m_MagazineInHand, m_NewJamChance, m_player, m_readyToStart, m_SuitableMagazines, m_WaitToSyncJamChance, m_WeaponInHand, OnWeaponActionEnd(), RefreshAnimationState(), DayZPlayerSyncJunctures::SendWeaponJamChance(), SetSutableMagazines() и StartPendingAction().

◆ WantContinue()

bool WantContinue ( )
inlineprivate
1014 {
1015 return m_WantContinue;
1016 }

Перекрестные ссылки m_WantContinue.

Поля

◆ FORCE_EJECT_BULLET_TIMEOUT

const int FORCE_EJECT_BULLET_TIMEOUT = 2000
protected

Используется в CanEjectBulletVerified().

◆ m_AnimationRefreshCooldown

int m_AnimationRefreshCooldown
protected

Используется в DelayedRefreshAnimationState(), Update() и WeaponManager().

◆ m_canEnd

bool m_canEnd
protected

Используется в StartPendingAction(), Update() и WeaponManager().

◆ m_ControlAction

ActionBase m_ControlAction
protected

Используется в OnWeaponActionEnd(), StartAction() и WeaponManager().

◆ m_ForceEjectBulletTimestamp

int m_ForceEjectBulletTimestamp
protected

◆ m_InIronSight

bool m_InIronSight
protected

Используется в Update().

◆ m_InOptic

bool m_InOptic
protected

Используется в Update().

◆ m_InProgress

◆ m_IsEventSended

bool m_IsEventSended
protected

◆ m_justStart

bool m_justStart
protected

Используется в Update().

◆ m_LastAcknowledgmentID

int m_LastAcknowledgmentID
protected

Используется в Synchronize() и WeaponManager().

◆ m_MagazineInHand

MagazineStorage m_MagazineInHand
protected

Используется в SetSutableMagazines(), Update() и WeaponManager().

◆ m_MagazinePilesInInventory

◆ m_MagazineStorageInInventory

ref array<MagazineStorage> m_MagazineStorageInInventory
protected

◆ m_NewJamChance

float m_NewJamChance
protected

Используется в OnSyncJuncture(), Update() и WeaponManager().

◆ m_PendingInventoryLocation

◆ m_PendingTargetMagazine

◆ m_PendingWeaponAction

◆ m_PendingWeaponActionAcknowledgmentID

int m_PendingWeaponActionAcknowledgmentID
protected

◆ m_player

◆ m_PreparedMagazine

Magazine m_PreparedMagazine
protected

Используется в SetSutableMagazines() и WeaponManager().

◆ m_readyToStart

bool m_readyToStart
protected

◆ m_SuitableMagazines

◆ m_TargetInventoryLocation

ref InventoryLocation m_TargetInventoryLocation
protected

◆ m_WaitToSyncJamChance

bool m_WaitToSyncJamChance
protected

Используется в Update() и WeaponManager().

◆ m_WantContinue

bool m_WantContinue
protected

◆ m_WeaponInHand

◆ MAX_DROP_MAGAZINE_DISTANCE_SQ

const float MAX_DROP_MAGAZINE_DISTANCE_SQ = 4
private

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