class Weapon_BaseSource
Weapon_Base › Weapon › InventoryItemSuper
View all 107 descendants
All members, including inherited
script base for all weapons
@NOTE: this class is bound to core-config "Weapon_Base" config class
Constructors 1
void Weapon_Base()Show 24 more
, string.Format(), InitDOFProperties(), InitObstructionDistance(), InitReliability(), InitShoulderDistance(), InitStateMachine(), InitWeaponLength(), InitWeaponLiftCheckVerticalOffset(), array.Insert(), CGame.IsClient(), CGame.IsServer(), new Timer(), m_BayonetAttached, m_BayonetAttachmentIdx, m_bulletSelectionIndex, m_BurstCount, m_ButtstockAttached, m_ButtstockAttachmentIdx, m_ChanceToJam, m_DelayedValidationTimer, m_DOFProperties, m_magazineSimpleSelectionIndex, m_WasIronSight, and m_weaponHideBarrelIdxConstants 4
const int SAMF_DEFAULT = WeaponWithAmmoFlags.CHAMBER | WeaponWithAmmoFlags.MAX_CAPACITY_MAGFull highest capacity magazine + chambered round
Show 13 more
, Flaregun.OnDebugSpawn(), Izh18_Base.OnDebugSpawn(), Izh18Shotgun_Base.OnDebugSpawn(), Izh43Shotgun_Base.OnDebugSpawn(), LongHorn_Base.OnDebugSpawn(), M79_Base.OnDebugSpawn(), Mosin9130.OnDebugSpawn(), Mp133Shotgun_Base.OnDebugSpawn(), R12_Base.OnDebugSpawn(), SawedoffMosin9130_Base.OnDebugSpawn(), SKS_Base.OnDebugSpawn(), OnDebugSpawn(), and Winchester70_Base.OnDebugSpawn()const int SAMF_RNG = WeaponWithAmmoFlags.CHAMBER_RNG | WeaponWithAmmoFlags.QUANTITY_RNGRandom bullet quantity + maybe chambered round
const float VALIDATE_DELAY = 5.0Validation on client side delay to have time properly synchronize attachments needed for check
protected const float DEFAULT_DAMAGE_ON_SHOT = 0.05Members 30
protected ref array<ref AbilityRecord> m_abilities = new array<ref AbilityRecord>weapon abilities
Show 17 more
, Crossbow_Base.InitStateMachine(), DoubleBarrel_Base.InitStateMachine(), Flaregun.InitStateMachine(), Magnum_Base.InitStateMachine(), Mp133Shotgun_Base.InitStateMachine(), OpenBolt_Base.InitStateMachine(), Pistol_Base.InitStateMachine(), Repeater_Base.InitStateMachine(), Rifle_Base.InitStateMachine(), RifleBoltFree_Base.InitStateMachine(), RifleBoltLock_Base.InitStateMachine(), RifleSingleShot_Base.InitStateMachine(), RifleSingleShotManual_Base.InitStateMachine(), SingleShotPistol_Base.InitStateMachine(), SKS_Base.InitStateMachine(), GetAbility(), and GetAbilityCount()protected ref WeaponFSM m_fsmweapon state machine
Show 29 more
, Crossbow_Base.InitStateMachine(), DoubleBarrel_Base.InitStateMachine(), Flaregun.InitStateMachine(), Magnum_Base.InitStateMachine(), Mp133Shotgun_Base.InitStateMachine(), OpenBolt_Base.InitStateMachine(), Pistol_Base.InitStateMachine(), Repeater_Base.InitStateMachine(), Rifle_Base.InitStateMachine(), RifleBoltFree_Base.InitStateMachine(), RifleBoltLock_Base.InitStateMachine(), RifleSingleShot_Base.InitStateMachine(), RifleSingleShotManual_Base.InitStateMachine(), SingleShotPistol_Base.InitStateMachine(), SKS_Base.InitStateMachine(), AfterStoreLoad(), CanProcessWeaponEvents(), GetCurrentStableStateID(), GetCurrentState(), GetInternalStateID(), LoadCurrentFSMState(), OnStoreLoad(), OnStoreSave(), ProcessWeaponAbortEvent(), ProcessWeaponEvent(), RandomizeFSMState(), SaveCurrentFSMState(), SetInitialState(), and ValidateAndRepair()protected bool m_isJammed = falseprotected bool m_LiftWeapon = falseprotected bool m_BayonetAttachedprotected bool m_ButtstockAttachedprotected bool m_Charged = falseprotected bool m_WeaponOpen = falseprotected bool m_WasIronSightprotected int m_BurstCountprotected int m_BayonetAttachmentIdxShow 1 more
, Weapon_Base()protected int m_ButtstockAttachmentIdxShow 1 more
, Weapon_Base()protected int m_weaponAnimState = -1animation state the weapon is in, -1 == uninitialized
protected int m_magazineSimpleSelectionIndex = -1protected int m_weaponHideBarrelIdx = -1index in simpleHiddenSelections cfg array
protected float m_DmgPerShot = 0default is set to zero, since C++ solution has been implemented. See 'damageBarrel' and 'barrelArmor' in configs.
protected float m_WeaponLengthShow 1 more
, LiftWeaponCheckEx()protected float m_WeaponLiftCheckVerticalOffsetprotected float m_ShoulderDistanceShow 1 more
, LiftWeaponCheckEx()protected float m_ObstructionDistanceShow 1 more
, UseWeaponObstruction()protected vector m_LastLiftPositionprotected int m_LastLiftHitprotected float m_ChanceToJamSync = 0protected ref PropertyModifiers m_PropertyModifierObjectprotected PhxInteractionLayers hit_mask = PhxInteractionLayers.CHARACTER | PhxInteractionLayers.BUILDING | PhxInteractionLayers.DOOR | PhxInteractionLayers.VEHICLE | PhxInteractionLayers.ROADWAY | PhxInteractionLayers.TERRAIN | PhxInteractionLayers.ITEM_SMALL | PhxInteractionLayers.ITEM_LARGE | PhxInteractionLayers.FENCE | PhxInteractionLayers.AIprotected ref Timer m_DelayedValidationTimerprivate float m_coolDownTime = 0Methods 116
void InitStateMachine()override void EEInit()Show 1 more
, CGame.IsServer()void SetInitialState(WeaponStableState initState)Show 15 more
, Crossbow_Base.InitStateMachine(), DoubleBarrel_Base.InitStateMachine(), Flaregun.InitStateMachine(), Magnum_Base.InitStateMachine(), Mp133Shotgun_Base.InitStateMachine(), OpenBolt_Base.InitStateMachine(), Pistol_Base.InitStateMachine(), Repeater_Base.InitStateMachine(), Rifle_Base.InitStateMachine(), RifleBoltFree_Base.InitStateMachine(), RifleBoltLock_Base.InitStateMachine(), RifleSingleShot_Base.InitStateMachine(), RifleSingleShotManual_Base.InitStateMachine(), SingleShotPistol_Base.InitStateMachine(), and SKS_Base.InitStateMachine()void SetCharged(bool value)Show 14 more
, WeaponChamberFromAttMag.OnEntry(), WeaponChamberFromAttMagOpenbolt.OnEntry(), WeaponChambering_Cartridge.OnExit(), WeaponChambering_Cartridge_ChambToMag.OnExit(), WeaponChambering_Chamber_OnEntry.OnEntry(), WeaponChambering_InternalMagazine_OnEntry.OnEntry(), WeaponChambering_InternalMagazine_OnExit.OnExit(), WeaponCharging_CK.OnEntry(), WeaponChargingOpenBolt_CK.OnEntry(), WeaponEjectAllMuzzles.OnEntry(), WeaponStableState.OnEntry(), XBCockedEmpty.OnEntry(), XBLoaded.OnEntry(), and XBUncockedEmpty.OnEntry()void SetWeaponOpen(bool value)Show 13 more
, Pistol_OPE_DIS_BU0_MA1.OnEntry(), RBL_OPN_BU0_MA0.OnEntry(), RBL_OPN_BU0_MA1.OnEntry(), SKS_OPN_BU0.OnEntry(), SetInitialState(), WeaponChamberFromAttMag.OnEntry(), WeaponChamberFromAttMagOpenbolt.OnEntry(), WeaponChambering_Base.CloseBolt(), WeaponChambering_Base.OpenBolt(), WeaponCharging_CK.OnEntry(), WeaponChargingOpenBolt_CK.OnEntry(), WeaponEjectAllMuzzles.OnEntry(), and WeaponStableState.OnEntry()Show 16 more
, string.Format(), Ammunition_Base.GetAmmoWeightByBulletType(), Weapon.GetChamberAmmoTypeName(), EntityAI.GetConfigWeightModified(), Weapon.GetInternalMagazineCartridgeCount(), Weapon.GetInternalMagazineCartridgeInfo(), EntityAI.GetInventoryAndCargoWeight(), Weapon.GetMuzzleCount(), WeightDebug.GetWeightDebug(), Weapon.HasInternalMagazine(), Weapon.IsChamberEmpty(), WeightDebugData.SetCalcDetails(), float.ToString(), float.ToString(), EntityAI.m_ConfigWeight, and WeightDebug.m_VerbosityFlagsvoid AssembleGun()override on weapons with some assembly required
Show 2 more
, SCARH_Base.AssembleGun(), and SSG82_Base.AssembleGun()query if weapon supports action and actionType
- in
action oneof Human.actions (i.e. RELOAD, MECHANISM, ...)- in
actionType oneof Human.actionTypes (i.e. CHAMBERING_ONEBULLET_CLOSED, MECHANISM_CLOSED...)
Returns: true if weapon supports operation
Show 1 more
, AbilityRecord.m_actionTypeint GetAbilityCount()Returns: number of stored abilities
AbilityRecord GetAbility(int index)- in
index indexinto m_abilities storage
Returns: ability record
bool CanProcessWeaponEvents()Returns: true if weapon has running fsm
Show 10 more
, FirearmActionBase.ActionCondition(), IsIdle(), IsWaitingForActionFinish(), WeaponDryFire.OnUpdate(), WeaponFire.OnUpdate(), WeaponFireAndChamberNext.OnUpdate(), WeaponFireAndChamberNextFromInnerMag.OnUpdate(), WeaponFireMagnum.OnUpdate(), WeaponFireMultiMuzzle.OnUpdate(), and WeaponFireToJam.OnUpdate()WeaponStateBase GetCurrentState()returns currently active state
Returns: current state the FSM is in (or NULL)
bool IsWaitingForActionFinish()returns true if state machine started playing action/actionType and waits for finish
bool IsIdle()bool ProcessWeaponEvent(WeaponEventBase e)weapon's fsm handling of events @NOTE: warning: ProcessWeaponEvent can be called only within DayZPlayer::HandleWeapons (or ::CommandHandler)
Show 3 more
, SetNextWeaponMode(), SyncEventToRemote(), and m_fsmbool ProcessWeaponAbortEvent(WeaponEventBase e)@NOTE: warning: ProcessWeaponEvent can be called only within DayZPlayer::HandleWeapons (or ::CommandHandler)
Show 1 more
, Weapon.IsInternalMagazineFull()void SetWeaponAnimState(int state)void ResetWeaponAnimState()Show 2 more
, LogManager.IsWeaponLogEnable(), and m_weaponAnimStateint GetWeaponAnimState()Show 2 more
, PlayerBase.GetRandomGeneratorSyncManager(), and GetSyncChanceToJam()void ShowBullet(int muzzleIndex)Show 1 more
, m_bulletSelectionIndexShow 1 more
, WeaponChambering_Base.ShowBullet()void HideBullet(int muzzleIndex)Show 1 more
, m_bulletSelectionIndexbool IsJammed()Show 13 more
, Magnum_Static_State.IsJammed(), SlotsIcon.RefreshMuzzleIcon(), CanFire(), RandomizeFSMState(), WeaponFireAndChamber.OnEntry(), WeaponFireAndChamberFromInnerMagazine.OnEntry(), WeaponFSM.Internal_ValidateAndRepair(), WeaponGuardJammed.GuardCondition(), WeaponManager.CanEjectBullet(), WeaponManager.CanLoadBullet(), WeaponManager.CanLoadMultipleBullet(), WeaponManager.CanUnjam(), and WeaponManager.Fire()bool CanEjectBullet()void SetJammed(bool value)Show 1 more
, WeaponUnjamming_Cartridge.OnEntry()float GetSyncChanceToJam()float GetChanceToJam()Show 2 more
, RifleBoltLock_Base.GetChanceToJam(), and WeaponManager.Update()void ForceSyncSelectionState()override bool OnStoreLoad(ParamsReadContext ctx, int version)Show 13 more
, Object.GetDebugName(), Weapon.GetMuzzleCount(), LogManager.IsWeaponLogEnable(), WeaponFSM.OnStoreLoad(), ItemBase.OnStoreLoad(), Serializer.Read(), Weapon.SetCurrentMode(), Weapon.SetCurrentMuzzle(), Weapon.SetGroundAnimFrameIndex(), wpnDebugPrint(), WeaponStableState.m_animState, m_fsm, and m_isJammedvoid SaveCurrentFSMState(ParamsWriteContext ctx)bool LoadCurrentFSMState(ParamsReadContext ctx, int version)override void AfterStoreLoad()Show 2 more
, SyncSelectionState(), and m_fsmoverride void OnStoreSave(ParamsWriteContext ctx)Show 5 more
, WeaponFSM.OnStoreSave(), ItemBase.OnStoreSave(), Serializer.Write(), m_fsm, and m_isJammedint GetInternalStateID()tries to return identifier of current state
int GetCurrentStableStateID()tries to return identifier of current stable state (or nearest stable state if unstable state is currently running)
void RandomizeFSMState()With the parameters given, selects a random suitable state for the FSM of the weapon @WARNING: Weapon_Base.Synchronize call might be needed, if this method is called while clients are connected
Show 5 more
, GetMuzzleStates(), Weapon.IsChamberEmpty(), IsJammed(), WeaponFSM.RandomizeFSMStateEx(), and m_fsmShow 1 more
, WeaponFSM.ValidateAndRepairHelper()protected array<MuzzleState> GetMuzzleStates()Helper method for RandomizeFSMState
Show 4 more
, array.Insert(), Weapon.IsChamberEmpty(), Weapon.IsChamberFiredOut(), and Weapon.IsChamberFull()static Weapon_Base CreateWeaponWithAmmo(string weaponType, string magazineType = "", int flags = WeaponWithAmmoFlags.CHAMBER)Create weapon with ammo
- in
weaponType stringThe weapon to create- in
magazineType stringThe magazine to attach or ammo to load, passing in empty string will select random- in
flags intSetup flags, please read WeaponWithAmmoFlags
Returns: The created weapon
Show 3 more
, string.Format(), SpawnAmmo(), and vector.ZeroGeneral method trying to attch magazine, fill inner magazine and fill chamber
- in
magazineType stringThe magazine to attach or ammo to load, passing in empty string will select random- in
flags intSetup flags, please read WeaponWithAmmoFlags
Returns: whether anything was spawned or done
Show 2 more
, Weapon.HasInternalMagazine(), and SpawnAttachedMagazine()Show 15 more
, Flaregun.OnDebugSpawn(), Izh18_Base.OnDebugSpawn(), Izh18Shotgun_Base.OnDebugSpawn(), Izh43Shotgun_Base.OnDebugSpawn(), LongHorn_Base.OnDebugSpawn(), M79_Base.OnDebugSpawn(), Mosin9130.OnDebugSpawn(), Mp133Shotgun_Base.OnDebugSpawn(), PlayerSpawnHandler.CreateChildItem(), R12_Base.OnDebugSpawn(), SawedoffMosin9130_Base.OnDebugSpawn(), SKS_Base.OnDebugSpawn(), CreateWeaponWithAmmo(), OnDebugSpawn(), and Winchester70_Base.OnDebugSpawn()Try to spawn and attach a magazine
- in
magazineType stringThe magazine to attach, passing in empty string will select random- in
flags intSetup flags, please read WeaponWithAmmoFlags
Returns: The created magazine or null
Show 14 more
, FillChamber(), string.Format(), Magazine.GetAmmoMax(), Object.GetDebugName(), EntityAI.GetInventory(), Weapon.GetMagazineTypeCount(), Weapon.GetMaxMagazineTypeName(), Weapon.GetRandomMagazineTypeName(), MustBeChambered(), Math.RandomIntInclusive(), RandomizeFSMState(), Magazine.ServerAcquireCartridge(), Magazine.ServerSetAmmoCount(), and Weapon.Synchronize()Show 22 more
, AKS74U.OnDebugSpawn(), Aug.OnDebugSpawn(), AugShort.OnDebugSpawn(), Colt1911_Base.OnDebugSpawn(), CZ61_Base.OnDebugSpawn(), CZ75_Base.OnDebugSpawn(), Deagle_Base.OnDebugSpawn(), FAL_Base.OnDebugSpawn(), Famas_Base.OnDebugSpawn(), FNX45_Base.OnDebugSpawn(), Glock19_Base.OnDebugSpawn(), M14_Base.OnDebugSpawn(), M16A2_Base.OnDebugSpawn(), MakarovIJ70_Base.OnDebugSpawn(), MP5K_Base.OnDebugSpawn(), PP19_Base.OnDebugSpawn(), Ruger1022_Base.OnDebugSpawn(), SCARH_Base.OnDebugSpawn(), SVD_Base.OnDebugSpawn(), UMP45_Base.OnDebugSpawn(), VSS_Base.OnDebugSpawn(), and SpawnAmmo()Try to fill the inner magazine
- in
ammoType stringThe ammo to load, passing in empty string will select random- in
flags intSetup flags, please read WeaponWithAmmoFlags
Returns: Whether any ammo was added to the gun or not
Try to fill the chamber
- in
ammoType stringThe ammo to load, passing in empty string will select random- in
flags intSetup flags, please read WeaponWithAmmoFlags
Returns: Whether any chamber was filled
override int GetSlotsCountCorrect()Returns number of slots for attachments corrected for weapons
Show 1 more
, Weapon.GetMuzzleCount()PropertyModifiers GetPropertyModifierObject()Show 2 more
, EEItemAttached(), and EEItemDetached()void OnFire(int muzzle_index)Show 2 more
, WeaponFireToJam.OnEntry(), and WeaponFireWithEject.OnEntry()void OnFireModeChange(int fireMode)Show 2 more
, ResetBurstCount(), and EffectSound.SetAutodestroy()void DelayedValidateAndRepair()Show 2 more
, m_DelayedValidationTimer, and VALIDATE_DELAYvoid ValidateAndRepair()override void OnInventoryEnter(Man player)Show 2 more
, ValidateAndRepair(), and m_PropertyModifierObjectoverride void OnInventoryExit(Man player)override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)Show 2 more
, EntityAI.GetHierarchyRootPlayer(), and PlayerBase.GetItemInHands()Show 3 more
, LogManager.IsWeaponLogEnable(), Class.Type(), and wpnDebugPrint()bool IsRemoteWeapon()void SyncEventToRemote(WeaponEventBase e)Show 10 more
, EntityAI.GetHierarchyParent(), DayZPlayer.GetInstanceType(), LogManager.IsWeaponLogEnable(), new ScriptRemoteInputUserData(), DayZPlayer.StoreInputForRemotes(), wpnDebugPrint(), Serializer.Write(), WeaponEventBase.WriteToContext(), WeaponEventBase.m_magazine, and WeaponEventBase.m_playerRecoilBase SpawnRecoilObject()bool CanFire()Show 3 more
, Object.IsDamageDestroyed(), IsJammed(), and m_LiftWeaponbool CanEnterIronsights()Initializes DOF properties for weapon's ironsight/optics cameras
bool InitWeaponLength()gets weapon length from config for weaponlift raycast
bool InitWeaponLiftCheckVerticalOffset()gets weapon vertical offset from config for weaponlift raycast
protected bool InitShoulderDistance()gets approximate weapon distance from shoulder from config
protected bool InitObstructionDistance()gets weapon obstruction distance from shoulder at which the weapon is fully obstructed
void SetWasIronSight(bool state)bool LiftWeaponCheck(PlayerBase player)bool UseWeaponObstruction(PlayerBase player, float obstructionValue, Object hitObject)Returns whether this weapon can use obstruction instead of weapon lift. Implement simple conditions only (e.g. checking for attachments, weapon types, ...) to prevent possible desyncs.
obstructionValue- The percentage of penetration into hit object
hitObject- The object obstructing the weapon
protected void GetApproximateAimOffsets(Blend2DVector dst, int characterStance)CFGGAMEPLAY
protected vector GetApproximateMovementOffset(vector localVelocity, int characterStance, float lean, float ud11, float lr11)Show 3 more
, Math.Max(), Math.Pow(), and Vector()protected void ApproximateWeaponLiftTransform(inout vector start, inout vector direction, HumanMovementState hms, HumanInputController hic, HumanCommandWeapons hcw, HumanCommandMove hcm, vector localVelocity = "0 0 0")Update provided `start` position and lift check `direction` to include appproximated character state.
start- Ray start position, to be modified
direction- Ray direction
Show 27 more
, WeaponLiftDiag.Data(), HumanCommandWeapons.GetAimingHandsOffsetLR(), HumanCommandWeapons.GetAimingHandsOffsetUD(), GetApproximateAimOffsets(), GetApproximateMovementOffset(), HumanCommandWeapons.GetBaseAimingAngleLR(), HumanCommandWeapons.GetBaseAimingAngleUD(), PluginDiagMenuClient.GetWeaponLiftDiag(), Math.InverseLerp(), vector.InvMultiply3(), HumanCommandMove.IsChangingStance(), Math3D.MatrixMultiply3(), vector.Multiply4(), vector.Normalized(), vector.RotateAroundZeroDeg(), WeaponLiftDiagData.SetAimAngles(), WeaponLiftDiagData.SetTransform(), Vector(), Math3D.YawPitchRollMatrix(), DayZPlayerCamera1stPerson.CONST_LR_MAX, DayZPlayerCamera1stPerson.CONST_LR_MIN, DayZPlayerCamera1stPerson.CONST_UD_MAX, DayZPlayerCamera1stPerson.CONST_UD_MIN, HumanMovementState.m_fLeaning, HumanMovementState.m_iStanceIdx, m_WeaponLiftCheckVerticalOffset, and vector.Upprivate float ApproximateBaseObstructionLength()Approximate `ObstructionDistance` for weapons with no configuration. Returned length doesn't account for attachments.
bool LiftWeaponCheckEx(PlayerBase player, out float outObstruction, out Object outHitObject)Perform weapon obstruction check by the provided `player`.
player- The player to perform the check.
outObstruction- Result obstruction value [0 .. 1] or > 1 when out of range and needs lift instead
outHitObject- Object that was hit (if any)
Returns: True whenever weapon should be lifted or obstruted. (See also Weapon_Base.UseWeaponObstruction)
Show 59 more
, ApproximateWeaponLiftTransform(), HumanInputController.CameraIsFreeLook(), Math.Clamp(), array.Count(), WeaponLiftDiag.Data(), vector.DistanceSq(), vector.Dot(), HumanCommandWeapons.GetAimingHandsOffsetLR(), HumanCommandWeapons.GetAimingHandsOffsetUD(), HumanCommandWeapons.GetBaseAimingAngleLR(), HumanCommandWeapons.GetBaseAimingAngleUD(), Human.GetBoneIndexByName(), Object.GetBonePositionWS(), Human.GetCommand_Move(), Human.GetCommandModifier_Weapons(), CGame.GetCurrentCameraDirection(), GetEffectiveAttachmentLength(), MiscGameplayFunctions.GetHeadingVector(), Human.GetInputController(), Human.GetMovementState(), Object.GetOrientation(), Object.GetPosition(), Entity.GetSimulationTimeStamp(), GetVelocity(), PluginDiagMenuClient.GetWeaponLiftDiag(), HumanCommandWeapons.GetWeaponObstruction(), new HumanMovementState(), Math.InverseLerp(), HumanMovementState.IsRaised(), vector.Length(), LiftWeaponRaycastResultCheck(), vector.Normalized(), vector.Normalized(), Print(), new RaycastRVParams(), DayZPhysics.RaycastRVProxy(), WeaponLiftDiag.Reset(), WeaponLiftDiagData.SetIntersectionParams(), WeaponLiftDiagData.SetLastPosition(), WeaponLiftDiagData.SetWeaponRayParams(), Vector(), IEntity.VectorToLocal(), DayZPlayerCamera1stPerson.CONST_UD_MAX, DayZPlayerCamera1stPerson.CONST_UD_MIN, Math.DEG2RAD, RaycastRVParams.flags, HumanMovementState.m_CommandTypeId, PlayerBase.m_DirectionToCursor, m_LastLiftHit, m_LastLiftPosition, m_LiftWeapon, m_ObstructionDistance, m_ShoulderDistance, m_WeaponLength, float.MAX, RaycastRVResult.obj, RaycastRVResult.pos, RaycastRVParams.type, and vector.ZeroRecomputes the provided `obstruction01` value typically returned by `LiftWeaponCheckEx` from the [0 ... 1] range to distance in meters the weapon penetrates the obstacle.
obstruction01- Obstruction progress
Returns: Penetration depth in meters
Show 3 more
, m_ObstructionDistance, m_ShoulderDistance, and m_WeaponLengthbool LiftWeaponRaycastResultCheck(notnull RaycastRVResult res)Return whether provided material triggers weapon lift (true) or not (false).
float GetEffectiveAttachmentLength()Returns effective length of attachments that influence total weapon length
void SetSyncJammingChance(float jamming_chance)unload bullet from chamber or internal magazine
@NOTE: EjectCartridge = GetCartridgeInfo + PopCartridge
- in
muzzleIndex - out
ammoDamage damageof the ammo- out
ammoTypeName typename of the ejected ammo
Returns: true if bullet removed from chamber
Show 1 more
, Weapon.PopCartridgeFromInternalMagazine()bool CopyWeaponStateFrom(notnull Weapon_Base src)Show 11 more
, Weapon.GetInternalMagazineCartridgeCount(), Weapon.GetInternalMagazineCartridgeInfo(), Weapon.GetMuzzleCount(), ScriptReadWriteContext.GetReadContext(), ScriptReadWriteContext.GetWriteContext(), Weapon.IsChamberEmpty(), OnStoreLoad(), OnStoreSave(), Weapon.PushCartridgeToChamber(), Weapon.PushCartridgeToInternalMagazine(), and int.MAXattachment helpers (firearm melee)
override bool HasBayonetAttached()override int GetBayonetAttachmentIdx()override bool HasButtstockAttached()override int GetButtstockAttachmentIdx()void HideWeaponBarrel(bool state)Show 2 more
, EntityAI.SetSimpleHiddenSelectionState(), and m_weaponHideBarrelIdxvoid ShowMagazine()void HideMagazine()Show 13 more
, ChamberFirst_InnerMagazine_SemiAutomatic_Base.InitStateMachine(), DetachOldMagazine.OnExit(), Mp133Shotgun_Base.InitStateMachine(), OpenBolt_Base.InitStateMachine(), Pistol_Base.InitStateMachine(), Repeater_Base.InitStateMachine(), RifleBoltFree_Base.InitStateMachine(), RifleBoltLock_Base.InitStateMachine(), SKS_Base.InitStateMachine(), ForceSyncSelectionState(), SyncSelectionState(), WeaponDetachingMag_Store.OnExit(), and WeaponDetachingMag_StoreRemoveChamberBullet.OnExit()bool IsShowingChamberedBullet()int GetBurstCount()void ResetBurstCount()override void SetActions()override bool CanBeUsedForSuicide()override void OnDebugSpawn()bool AddJunctureToAttachedMagazine(PlayerBase player, int timeoutMS)Show 1 more
, new InventoryLocation()void ClearJunctureToAttachedMagazine(PlayerBase player)void SetNextWeaponMode(int muzzleIndex)void SetCoolDown(float coolDownTime)void UpdateCoolDown(float dt)void SetSyncStable(bool value)TEST_WEAPON_SYSNC_REPAIRbool IsSyncStable()TEST_WEAPON_SYSNC_REPAIR