PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
WeaponManager Class Reference

Private Member Functions

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 CanLoadMultipleBullet (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)
 
private 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)
 

Private Attributes

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

Constructor & Destructor Documentation

◆ WeaponManager()

Member Function Documentation

◆ AttachMagazine()

bool AttachMagazine ( Magazine  mag,
ActionBase  control_action = NULL 
)
inlineprivate

◆ CanAttachMagazine()

bool CanAttachMagazine ( Weapon_Base  wpn,
Magazine  mag,
bool  reservationCheck = true 
)
inlineprivate

◆ CanDetachMagazine()

bool CanDetachMagazine ( Weapon_Base  wpn,
Magazine  mag,
bool  reservationCheck = true 
)
inlineprivate

References m_player.

◆ CanEjectBullet()

bool CanEjectBullet ( Weapon_Base  wpn,
bool  reservationCheck = true 
)
inlineprivate

◆ CanEjectBulletVerified()

bool CanEjectBulletVerified ( )
inlineprivate

◆ CanFire()

bool CanFire ( Weapon_Base  wpn)
inlineprivate

References m_player.

◆ CanLoadBullet()

bool CanLoadBullet ( Weapon_Base  wpn,
Magazine  mag,
bool  reservationCheck = true 
)
inlineprivate

◆ CanLoadMultipleBullet()

bool CanLoadMultipleBullet ( Weapon_Base  wpn,
Magazine  mag,
bool  reservationCheck = true 
)
inlineprivate

◆ CanSwapMagazine()

◆ CanUnjam()

bool CanUnjam ( Weapon_Base  wpn,
bool  reservationCheck = true 
)
inlineprivate

References m_player.

◆ CompareMagazinesSuitability()

int CompareMagazinesSuitability ( Magazine  mag1,
Magazine  mag2 
)
inlineprivate

◆ DelayedRefreshAnimationState()

void DelayedRefreshAnimationState ( int  delay)
inlineprivate

◆ DetachMagazine()

bool DetachMagazine ( InventoryLocation  invLoc,
ActionBase  control_action = NULL 
)
inlineprivate

◆ EjectBullet()

bool EjectBullet ( ActionBase  control_action = NULL)
inlineprivate

◆ EjectBulletVerified()

bool EjectBulletVerified ( ActionBase  control_action = NULL)
inlineprivate

◆ Fire()

void Fire ( Weapon_Base  wpn)
inlineprivate

References m_player.

◆ GetCurrentModeName()

string GetCurrentModeName ( )
inlineprivate

◆ GetNextPreparedMagazine()

Magazine GetNextPreparedMagazine ( out int  startIdx)
inlineprivate

◆ GetPreparedMagazine()

Magazine GetPreparedMagazine ( )
inlineprivate

References m_SuitableMagazines.

◆ InventoryReservation()

◆ IsRunning()

bool IsRunning ( )
inlineprivate

References m_InProgress.

Referenced by ActionPossibilityCheck(), and CanPlayEmote().

◆ LoadBullet()

bool LoadBullet ( Magazine  mag,
ActionBase  control_action = NULL 
)
inlineprivate

◆ LoadMultiBullet()

bool LoadMultiBullet ( Magazine  mag,
ActionBase  control_action = NULL 
)
inlineprivate

◆ LoadMultiBulletStop()

void LoadMultiBulletStop ( )
inlineprivate

References m_InProgress, and m_WantContinue.

◆ OnInputUserDataProcess()

◆ OnLiftWeapon()

void OnLiftWeapon ( )
inlineprivate

References m_WeaponInHand.

◆ OnMagazineAttach()

void OnMagazineAttach ( Magazine  mag)
inlineprivate

◆ OnMagazineDetach()

void OnMagazineDetach ( Magazine  mag)
inlineprivate

◆ OnMagazineInventoryEnter()

void OnMagazineInventoryEnter ( Magazine  mag)
inlineprivate

◆ OnMagazineInventoryExit()

void OnMagazineInventoryExit ( Magazine  mag)
inlineprivate

◆ OnSyncJuncture()

◆ OnWeaponActionEnd()

◆ PrepareInventoryLocationForMagazineSwap()

bool PrepareInventoryLocationForMagazineSwap ( notnull Weapon_Base  wpn,
notnull Magazine  new_mag,
out InventoryLocation  new_il 
)
inlineprivate

◆ Refresh()

void Refresh ( )
inlineprivate

References OnWeaponActionEnd().

◆ RefreshAnimationState()

void RefreshAnimationState ( )
inlineprivate

◆ SetEjectBulletTryTimestamp()

void SetEjectBulletTryTimestamp ( )
inlineprivate

◆ SetNextMuzzleMode()

bool SetNextMuzzleMode ( )
inlineprivate

◆ SetRunning()

void SetRunning ( bool  value)
inlineprivate

References m_InProgress.

◆ SetSutableMagazines()

◆ SortMagazineAfterLoad()

void SortMagazineAfterLoad ( )
inlineprivate

◆ StartAction()

◆ StartPendingAction()

◆ SwapMagazine()

bool SwapMagazine ( Magazine  mag,
ActionBase  control_action = NULL 
)
inlineprivate

◆ SwapMagazineEx()

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

◆ Synchronize()

◆ Unjam()

bool Unjam ( ActionBase  control_action = NULL)
inlineprivate

References AT_WPN_UNJAM, and StartAction().

◆ Update()

◆ WantContinue()

bool WantContinue ( )
inlineprivate

References m_WantContinue.

Field Documentation

◆ FORCE_EJECT_BULLET_TIMEOUT

protected const int FORCE_EJECT_BULLET_TIMEOUT = 2000
private

Referenced by CanEjectBulletVerified().

◆ m_AnimationRefreshCooldown

protected int m_AnimationRefreshCooldown
private

◆ m_canEnd

protected bool m_canEnd
private

◆ m_ControlAction

protected ActionBase m_ControlAction
private

◆ m_ForceEjectBulletTimestamp

protected int m_ForceEjectBulletTimestamp
private

◆ m_InIronSight

protected bool m_InIronSight
private

Referenced by Update().

◆ m_InOptic

protected bool m_InOptic
private

Referenced by Update().

◆ m_InProgress

◆ m_IsEventSended

protected bool m_IsEventSended
private

◆ m_justStart

protected bool m_justStart
private

Referenced by Update().

◆ m_LastAcknowledgmentID

protected int m_LastAcknowledgmentID
private

Referenced by Synchronize(), and WeaponManager().

◆ m_MagazineInHand

protected MagazineStorage m_MagazineInHand
private

◆ m_MagazinePilesInInventory

protected ref array<Magazine> m_MagazinePilesInInventory
private

◆ m_MagazineStorageInInventory

protected ref array<MagazineStorage> m_MagazineStorageInInventory
private

◆ m_NewJamChance

protected float m_NewJamChance
private

◆ m_PendingInventoryLocation

◆ m_PendingTargetMagazine

◆ m_PendingWeaponAction

◆ m_PendingWeaponActionAcknowledgmentID

protected int m_PendingWeaponActionAcknowledgmentID
private

◆ m_player

◆ m_PreparedMagazine

protected Magazine m_PreparedMagazine
private

◆ m_readyToStart

protected bool m_readyToStart
private

◆ m_SuitableMagazines

protected ref array<Magazine> m_SuitableMagazines
private

◆ m_TargetInventoryLocation

protected ref InventoryLocation m_TargetInventoryLocation
private

◆ m_WaitToSyncJamChance

protected bool m_WaitToSyncJamChance
private

Referenced by Update(), and WeaponManager().

◆ m_WantContinue

protected bool m_WantContinue
private

◆ m_WeaponInHand

◆ MAX_DROP_MAGAZINE_DISTANCE_SQ

const float MAX_DROP_MAGAZINE_DISTANCE_SQ = 4
private

The documentation for this class was generated from the following file: