![]() |
Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
|
script counterpart to engine's class Weapon More...
Protected Member Functions | |
| override void | AfterStoreLoad () |
| void | AssembleGun () |
| override on weapons with some assembly required | |
| bool | CanChamberBullet (int muzzleIndex, Magazine mag) |
| bool | CanEjectBullet () |
| bool | CanProcessAction (int action, int actionType) |
| bool | CanProcessWeaponEvents () |
| void | EEFired (int muzzleType, int mode, string ammoType) |
| void | ForceSyncSelectionState () |
| AbilityRecord | GetAbility (int index) |
| int | GetAbilityCount () |
| float | GetChanceToJam () |
| int | GetCurrentStableStateID () |
| tries to return identifier of current stable state (or nearest stable state if unstable state is currently running) | |
| WeaponStateBase | GetCurrentState () |
| returns currently active state | |
| int | GetInternalStateID () |
| array< MuzzleState > | GetMuzzleStates () |
| Helper method for RandomizeFSMState. | |
| float | GetSyncChanceToJam () |
| int | GetWeaponAnimState () |
| float | GetWeightSpecialized (bool forceRecalc=false) |
| bool | HasActionAbility (int action, int actionType) |
| void | HideBullet (int muzzleIndex) |
| bool | IsIdle () |
| bool | IsJammed () |
| bool | IsWaitingForActionFinish () |
| returns true if state machine started playing action/actionType and waits for finish | |
| bool | JamCheck (int muzzleIndex) |
| bool | LoadCurrentFSMState (ParamsReadContext ctx, int version) |
| override bool | OnStoreLoad (ParamsReadContext ctx, int version) |
| override void | OnStoreSave (ParamsWriteContext ctx) |
| bool | ProcessWeaponAbortEvent (WeaponEventBase e) |
| bool | ProcessWeaponEvent (WeaponEventBase e) |
| 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. | |
| void | ResetWeaponAnimState () |
| void | SaveCurrentFSMState (ParamsWriteContext ctx) |
| void | SetJammed (bool value) |
| void | SetWeaponAnimState (int state) |
| void | ShowBullet (int muzzleIndex) |
| void | SyncSelectionState (bool has_bullet, bool has_mag) |
Private Member Functions | |
| override void | EEInit () |
| override int | GetSlotsCountCorrect () |
| Returns number of slots for attachments corrected for weapons. | |
| void | InitStateMachine () |
| bool | IsCharged () |
| bool | IsWeaponOpen () |
| void | SetCharged (bool value) |
| void | SetInitialState (WeaponStableState initState) |
| void | SetWeaponOpen (bool value) |
| void | Weapon_Base () |
Private Attributes | |
| float | m_coolDownTime = 0 |
| const int | SAMF_DEFAULT = WeaponWithAmmoFlags.CHAMBER | WeaponWithAmmoFlags.MAX_CAPACITY_MAG |
| Full highest capacity magazine + chambered round. | |
| const int | SAMF_RNG = WeaponWithAmmoFlags.CHAMBER_RNG | WeaponWithAmmoFlags.QUANTITY_RNG |
| Random bullet quantity + maybe chambered round. | |
| const float | VALIDATE_DELAY = 5.0 |
| Validation on client side delay to have time properly synchronize attachments needed for check. | |
Weapon With Ammo | |
Helpers for spawning ammo/magazine in weapon For the flags, either a combination of WeaponWithAmmoFlags can be used Or one of the preset 'const int' with 'SAMF_' prefix (SAMF_DEFAULT, SAMF_RNG) | |
| 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. | |
| float | GetObstructionPenetrationDistance (float obstruction01) |
| Recomputes the provided obstruction01 value typically returned by LiftWeaponCheckEx from the [0 ... 1] range to distance in meters the weapon penetrates the obstacle. | |
| bool | 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) |
| bool | EjectCartridge (int muzzleIndex, out float ammoDamage, out string ammoTypeName) |
| bool | CopyWeaponStateFrom (notnull Weapon_Base src) |
| override void | SetBayonetAttached (bool pState, int slot_idx=-1) |
| attachment helpers (firearm melee) | |
| override bool | HasBayonetAttached () |
| override int | GetBayonetAttachmentIdx () |
| override void | SetButtstockAttached (bool pState, int slot_idx=-1) |
| override bool | HasButtstockAttached () |
| override int | GetButtstockAttachmentIdx () |
| void | HideWeaponBarrel (bool state) |
| void | ShowMagazine () |
| void | HideMagazine () |
| override EntityAI | ProcessMeleeItemDamage (int mode=0) |
| bool | IsShowingChamberedBullet () |
| int | GetBurstCount () |
| void | ResetBurstCount () |
| override void | SetActions () |
| override bool | CanBeUsedForSuicide () |
| override void | OnDebugSpawn () |
| bool | AddJunctureToAttachedMagazine (PlayerBase player, int timeoutMS) |
| void | ClearJunctureToAttachedMagazine (PlayerBase player) |
| void | SetNextWeaponMode (int muzzleIndex) |
| void | SetCoolDown (float coolDownTime) |
| void | UpdateCoolDown (float dt) |
| bool | IsCoolDown () |
| bool | MustBeChambered (int muzzleIndex) |
| bool | SpawnAmmo (string magazineType="", int flags=WeaponWithAmmoFlags.CHAMBER) |
| Magazine | SpawnAttachedMagazine (string magazineType="", int flags=WeaponWithAmmoFlags.CHAMBER) |
| bool | FillInnerMagazine (string ammoType="", int flags=WeaponWithAmmoFlags.CHAMBER) |
| bool | FillChamber (string ammoType="", int flags=WeaponWithAmmoFlags.CHAMBER) |
| bool | FillSpecificChamber (int muzzleIndex, float dmg=0, string ammoType="") |
| override int | GetSlotsCountCorrect () |
| Returns number of slots for attachments corrected for weapons. | |
| PropertyModifiers | GetPropertyModifierObject () |
| void | OnFire (int muzzle_index) |
| void | OnFireModeChange (int fireMode) |
| void | DelayedValidateAndRepair () |
| void | ValidateAndRepair () |
| override void | OnInventoryEnter (Man player) |
| override void | OnInventoryExit (Man player) |
| override void | EEItemAttached (EntityAI item, string slot_name) |
| override void | EEItemDetached (EntityAI item, string slot_name) |
| override void | EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc) |
| override void | OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner) |
| override bool | CanReleaseAttachment (EntityAI attachment) |
| override bool | CanRemoveFromHands (EntityAI parent) |
| bool | IsRemoteWeapon () |
| void | SyncEventToRemote (WeaponEventBase e) |
| RecoilBase | SpawnRecoilObject () |
| int | GetWeaponSpecificCommand (int weaponAction, int subCommand) |
| bool | CanFire () |
| bool | CanEnterIronsights () |
| bool | InitDOFProperties (out array< float > temp_array) |
| Initializes DOF properties for weapon's ironsight/optics cameras. | |
| bool | InitReliability (out array< float > reliability_array) |
| bool | InitWeaponLength () |
| gets weapon length from config for weaponlift raycast | |
| bool | InitWeaponLiftCheckVerticalOffset () |
| gets weapon vertical offset from config for weaponlift raycast | |
| bool | InitShoulderDistance () |
| gets approximate weapon distance from shoulder from config | |
| bool | InitObstructionDistance () |
| gets weapon obstruction distance from shoulder at which the weapon is fully obstructed | |
| ref array< float > | GetWeaponDOF () |
| bool | GetWasIronSight () |
| 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. | |
| void | GetApproximateAimOffsets (Blend2DVector dst, int characterStance) |
| vector | GetApproximateMovementOffset (vector localVelocity, int characterStance, float lean, float ud11, float lr11) |
| 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. | |
| static Weapon_Base | CreateWeaponWithAmmo (string weaponType, string magazineType="", int flags=WeaponWithAmmoFlags.CHAMBER) |
script counterpart to engine's class Weapon
Definition at line 47 of file inventoryitem.c.
|
inlineprivate |
Definition at line 2229 of file weapon_base.c.
References g_Game.
|
inlineprotected |
Definition at line 612 of file weapon_base.c.
References m_fsm, and SyncSelectionState().
|
inlineprivate |
Approximate ObstructionDistance for weapons with no configuration. Returned length doesn't account for attachments.
Definition at line 1643 of file weapon_base.c.
References m_ShoulderDistance, m_WeaponLength, and Math::Max().
Referenced by GetObstructionPenetrationDistance(), and LiftWeaponCheckEx().
|
inlineprotected |
Update provided start position and lift check direction to include appproximated character state.
| start | Ray start position, to be modified |
| direction | Ray direction |
Definition at line 1570 of file weapon_base.c.
References Blend2DVector, Math::Clamp(), HumanCommandWeapons::GetAimingHandsOffsetLR(), HumanCommandWeapons::GetAimingHandsOffsetUD(), Weapon_Base::GetApproximateAimOffsets(), Weapon_Base::GetApproximateMovementOffset(), HumanCommandWeapons::GetBaseAimingAngleLR(), HumanCommandWeapons::GetBaseAimingAngleUD(), Math::InverseLerp(), vector::InvMultiply3(), HumanCommandMove::IsChangingStance(), HumanMovementState::m_fLeaning, HumanMovementState::m_iStanceIdx, m_WeaponLiftCheckVerticalOffset, Math3D::MatrixMultiply3(), vector::Multiply4(), vector::Normalized(), vector::RotateAroundZeroDeg(), vector::Up, Vector(), and Math3D::YawPitchRollMatrix().
Referenced by LiftWeaponCheckEx().
|
protected |
override on weapons with some assembly required
Referenced by EEInit().
|
inlineprivate |
Definition at line 2215 of file weapon_base.c.
Definition at line 324 of file weapon_base.c.
References IsChamberFiredOut(), and IsChamberFull().
|
inlineprotected |
Definition at line 408 of file weapon_base.c.
|
inlineprotected |
Definition at line 1275 of file weapon_base.c.
References ItemOptics::HasWeaponIronsightsOverride().
|
inlineprotected |
Definition at line 1268 of file weapon_base.c.
References IsChamberFiredOut(), IsJammed(), and m_LiftWeapon.
Definition at line 236 of file weapon_base.c.
|
inlineprotected |
Definition at line 270 of file weapon_base.c.
References m_fsm.
Referenced by IsIdle(), and IsWaitingForActionFinish().
Definition at line 1195 of file weapon_base.c.
Definition at line 1214 of file weapon_base.c.
References GetCurrentState(), IsIdle(), LogManager::IsWeaponLogEnable(), Type, and wpnDebugPrint().
|
inlineprivate |
Definition at line 2241 of file weapon_base.c.
References g_Game.
|
inlineprivate |
Definition at line 2059 of file weapon_base.c.
References ScriptReadWriteContext::GetReadContext(), ScriptReadWriteContext::GetWriteContext(), OnStoreLoad(), and Weapon_Base().
|
inlinestaticprotected |
Definition at line 728 of file weapon_base.c.
References ECE_PLACE_ON_SURFACE, ErrorEx, g_Game, Weapon_Base(), and vector::Zero.
|
inlineprotected |
Definition at line 1073 of file weapon_base.c.
References Error(), m_DelayedValidationTimer, VALIDATE_DELAY, and ValidateAndRepair().
Referenced by OnInventoryEnter().
Definition at line 341 of file weapon_base.c.
References g_Game, and IncreaseOverheating().
|
inlineprivate |
Definition at line 135 of file weapon_base.c.
References AssembleGun(), CALL_CATEGORY_GAMEPLAY, and g_Game.
Definition at line 1116 of file weapon_base.c.
References GetPropertyModifierObject().
Definition at line 1123 of file weapon_base.c.
References GetPropertyModifierObject().
|
inlineprotected |
Definition at line 1130 of file weapon_base.c.
References HumanCommandMove::SetMeleeBlock().
|
inlineprivate |
Definition at line 2044 of file weapon_base.c.
Definition at line 929 of file weapon_base.c.
References FillSpecificChamber(), AmmoTypesAPI::MagazineTypeToAmmoType(), Math::RandomIntInclusive(), RandomizeFSMState(), and Synchronize().
Referenced by FillInnerMagazine(), SpawnAmmo(), and SpawnAttachedMagazine().
|
inlineprotected |
Definition at line 839 of file weapon_base.c.
References FillChamber(), FillSpecificChamber(), AmmoTypesAPI::MagazineTypeToAmmoType(), MustBeChambered(), Math::RandomIntInclusive(), RandomizeFSMState(), and Synchronize().
Referenced by SpawnAmmo().
Definition at line 986 of file weapon_base.c.
References AmmoTypesAPI::MagazineTypeToAmmoType().
Referenced by FillChamber(), and FillInnerMagazine().
|
inlineprotected |
Definition at line 462 of file weapon_base.c.
References Weapon_Base::HideBullet(), HideMagazine(), IsChamberFull(), Weapon_Base::ShowBullet(), and ShowMagazine().
Referenced by RandomizeFSMState().
|
inlineprotected |
Definition at line 265 of file weapon_base.c.
References m_abilities.
Referenced by HasActionAbility().
|
inlineprotected |
Definition at line 260 of file weapon_base.c.
References m_abilities.
Referenced by HasActionAbility().
|
inlineprotected |
Definition at line 1476 of file weapon_base.c.
References Blend2DVector.
|
inlineprotected |
Definition at line 1533 of file weapon_base.c.
References Math::AbsFloat(), Math::Clamp(), Math::Lerp(), Math::Max(), Math::Pow(), and Vector().
|
inlineprivate |
Definition at line 2105 of file weapon_base.c.
References m_BayonetAttachmentIdx.
Referenced by GetEffectiveAttachmentLength().
|
inlineprivate |
Definition at line 2191 of file weapon_base.c.
References m_BurstCount.
|
inlineprivate |
Definition at line 2121 of file weapon_base.c.
References m_ButtstockAttachmentIdx.
|
inlineprotected |
Definition at line 411 of file weapon_base.c.
References m_ChanceToJam.
|
inlineprotected |
tries to return identifier of current stable state (or nearest stable state if unstable state is currently running)
Definition at line 662 of file weapon_base.c.
References m_fsm.
|
inlineprotected |
returns currently active state
Definition at line 276 of file weapon_base.c.
References m_fsm.
Referenced by CanRemoveFromHands(), IsIdle(), IsWaitingForActionFinish(), and LoadCurrentFSMState().
|
inlineprivate |
Returns effective length of attachments that influence total weapon length.
Definition at line 2006 of file weapon_base.c.
References GetBayonetAttachmentIdx(), HasBayonetAttached(), and Math::Max().
Referenced by GetObstructionPenetrationDistance(), and LiftWeaponCheckEx().
|
inlineprotected |
Definition at line 652 of file weapon_base.c.
References m_fsm.
|
inlineprotected |
Helper method for RandomizeFSMState.
Definition at line 691 of file weapon_base.c.
References ErrorEx, IsChamberFiredOut(), and IsChamberFull().
Referenced by RandomizeFSMState().
Recomputes 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 |
Definition at line 1986 of file weapon_base.c.
References ApproximateBaseObstructionLength(), GetEffectiveAttachmentLength(), Math::Lerp(), m_ObstructionDistance, m_ShoulderDistance, and m_WeaponLength.
|
inlineprotected |
Definition at line 1019 of file weapon_base.c.
References m_PropertyModifierObject.
Referenced by EEItemAttached(), and EEItemDetached().
|
inlineprotected |
Returns number of slots for attachments corrected for weapons.
Definition at line 1011 of file weapon_base.c.
|
inlineprivate |
Returns number of slots for attachments corrected for weapons.
Definition at line 6 of file binocularsbase.c.
|
inlineprotected |
Definition at line 410 of file weapon_base.c.
References m_ChanceToJamSync.
Referenced by JamCheck().
|
inlineprotected |
Definition at line 1360 of file weapon_base.c.
References m_WasIronSight.
|
inlineprotected |
Definition at line 339 of file weapon_base.c.
References m_weaponAnimState.
Definition at line 1355 of file weapon_base.c.
References m_DOFProperties.
Definition at line 1263 of file weapon_base.c.
Definition at line 173 of file weapon_base.c.
References WeightDebugData::AddCalcDetails(), g_Game, Ammunition_Base::GetAmmoWeightByBulletType(), WeightDebugData::SetCalcDetails(), and float::ToString().
Definition at line 246 of file weapon_base.c.
References GetAbility(), GetAbilityCount(), AbilityRecord::m_action, and AbilityRecord::m_actionType.
|
inlineprivate |
Definition at line 2100 of file weapon_base.c.
References m_BayonetAttached.
Referenced by GetEffectiveAttachmentLength().
|
inlineprivate |
Definition at line 2116 of file weapon_base.c.
References m_ButtstockAttached.
|
inlineprotected |
Definition at line 397 of file weapon_base.c.
References m_bulletSelectionIndex.
|
inlineprivate |
Definition at line 2146 of file weapon_base.c.
References m_magazineSimpleSelectionIndex.
Referenced by ForceSyncSelectionState(), and SyncSelectionState().
|
inlineprivate |
Definition at line 2126 of file weapon_base.c.
References ItemOptics::AllowsDOF(), g_Game, and m_weaponHideBarrelIdx.
Referenced by OnItemLocationChanged().
Initializes DOF properties for weapon's ironsight/optics cameras.
Definition at line 1285 of file weapon_base.c.
References g_Game, and GetType().
Referenced by Weapon_Base().
|
inlineprotected |
gets weapon obstruction distance from shoulder at which the weapon is fully obstructed
Definition at line 1343 of file weapon_base.c.
References m_ObstructionDistance.
Referenced by Weapon_Base().
Definition at line 1295 of file weapon_base.c.
References g_Game, and GetType().
Referenced by Weapon_Base().
|
inlineprotected |
gets approximate weapon distance from shoulder from config
Definition at line 1330 of file weapon_base.c.
References m_ShoulderDistance.
Referenced by Weapon_Base().
|
inlineprivate |
Definition at line 133 of file weapon_base.c.
|
inlineprotected |
gets weapon length from config for weaponlift raycast
Definition at line 1306 of file weapon_base.c.
References m_WeaponLength.
Referenced by Weapon_Base().
|
inlineprotected |
gets weapon vertical offset from config for weaponlift raycast
Definition at line 1318 of file weapon_base.c.
References m_WeaponLiftCheckVerticalOffset.
Referenced by Weapon_Base().
|
inlineprivate |
Definition at line 153 of file weapon_base.c.
References m_Charged.
|
inlineprivate |
Definition at line 2261 of file weapon_base.c.
References m_coolDownTime.
|
inlineprotected |
Definition at line 286 of file weapon_base.c.
References CanProcessWeaponEvents(), and GetCurrentState().
|
inlineprotected |
Definition at line 407 of file weapon_base.c.
References m_isJammed.
|
inlineprotected |
Definition at line 1224 of file weapon_base.c.
References InventoryLocation::GetParent(), and InventoryLocation::GetType().
|
inlineprivate |
Definition at line 2186 of file weapon_base.c.
|
inlineprotected |
returns true if state machine started playing action/actionType and waits for finish
Definition at line 281 of file weapon_base.c.
References CanProcessWeaponEvents(), and GetCurrentState().
|
inlineprivate |
Definition at line 163 of file weapon_base.c.
References m_WeaponOpen.
Definition at line 374 of file weapon_base.c.
References GetSyncChanceToJam().
|
inlineprotected |
Definition at line 1372 of file weapon_base.c.
References LiftWeaponCheckEx().
|
inlineprivate |
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) |
Definition at line 1657 of file weapon_base.c.
References Math::Acos(), vector::AnglesToVector(), ApproximateBaseObstructionLength(), ApproximateWeaponLiftTransform(), HumanInputController::CameraIsFreeLook(), Math::Clamp(), Math::DEG2RAD, vector::DistanceSq(), vector::Dot(), RaycastRVParams::flags, g_Game, HumanCommandWeapons::GetAimingHandsOffsetLR(), HumanCommandWeapons::GetAimingHandsOffsetUD(), HumanCommandWeapons::GetBaseAimingAngleLR(), HumanCommandWeapons::GetBaseAimingAngleUD(), GetEffectiveAttachmentLength(), GetVelocity(), HumanCommandWeapons::GetWeaponObstruction(), Math::InverseLerp(), HumanMovementState::IsRaised(), LiftWeaponRaycastResultCheck(), HumanMovementState::m_CommandTypeId, m_LastLiftHit, m_LastLiftPosition, m_LiftWeapon, m_ObstructionDistance, m_ShoulderDistance, m_WeaponLength, RaycastRVResult::obj, RaycastRVResult::pos, Print(), DayZPhysics::RaycastRVProxy(), RaycastRVParams::type, Vector(), and vector::Zero.
Referenced by LiftWeaponCheck().
|
inlineprivate |
Return whether provided material triggers weapon lift (true) or not (false).
Definition at line 2000 of file weapon_base.c.
Referenced by LiftWeaponCheckEx().
|
inlineprotected |
Definition at line 579 of file weapon_base.c.
References Error(), GetCurrentState(), GetType(), WeaponStableState::HasBullet(), WeaponStableState::HasMagazine(), LogManager::IsWeaponLogEnable(), m_fsm, SyncSelectionState(), and wpnDebugPrint().
Definition at line 2267 of file weapon_base.c.
Referenced by FillInnerMagazine(), and SpawnAttachedMagazine().
|
inlineprivate |
Definition at line 2224 of file weapon_base.c.
References SAMF_DEFAULT, and SpawnAmmo().
|
inlineprotected |
Definition at line 1028 of file weapon_base.c.
References m_BurstCount.
|
inlineprotected |
Definition at line 1056 of file weapon_base.c.
References g_Game, GetPosition(), SEffectManager::PlaySound(), ResetBurstCount(), and EffectSound::SetAutodestroy().
|
inlineprotected |
Definition at line 1092 of file weapon_base.c.
References DelayedValidateAndRepair(), g_Game, m_PropertyModifierObject, and ValidateAndRepair().
|
inlineprotected |
Definition at line 1110 of file weapon_base.c.
References m_PropertyModifierObject.
Definition at line 1148 of file weapon_base.c.
References Class::CastTo(), HideWeaponBarrel(), and SetWasIronSight().
|
inlineprotected |
Definition at line 489 of file weapon_base.c.
References Error(), LogManager::IsWeaponLogEnable(), m_fsm, m_isJammed, Serializer::Read(), and wpnDebugPrint().
|
inlineprotected |
Definition at line 624 of file weapon_base.c.
References m_fsm, m_isJammed, and Serializer::Write().
Definition at line 2154 of file weapon_base.c.
References m_BayonetAttachmentIdx, and m_ButtstockAttachmentIdx.
|
inlineprotected |
Definition at line 315 of file weapon_base.c.
References m_fsm, and SyncEventToRemote().
|
inlineprotected |
Definition at line 295 of file weapon_base.c.
References WeaponEventBase::GetEventID(), m_fsm, SetNextWeaponMode(), and SyncEventToRemote().
|
inlineprotected |
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.
Definition at line 675 of file weapon_base.c.
References ForceSyncSelectionState(), GetMuzzleStates(), IsJammed(), and m_fsm.
Referenced by FillChamber(), FillInnerMagazine(), and SpawnAttachedMagazine().
|
inlineprivate |
Definition at line 2196 of file weapon_base.c.
References m_BurstCount.
Referenced by OnFireModeChange().
|
inlineprotected |
Definition at line 334 of file weapon_base.c.
References fsmDebugSpam(), LogManager::IsWeaponLogEnable(), and m_weaponAnimState.
|
inlineprotected |
Definition at line 564 of file weapon_base.c.
References Error(), GetType(), LogManager::IsWeaponLogEnable(), m_fsm, and wpnDebugPrint().
|
inlineprivate |
Definition at line 2201 of file weapon_base.c.
References AddAction(), and FirearmActionLoadBulletQuick().
attachment helpers (firearm melee)
Definition at line 2094 of file weapon_base.c.
References m_BayonetAttached, and m_BayonetAttachmentIdx.
Definition at line 2110 of file weapon_base.c.
References m_ButtstockAttached, and m_ButtstockAttachmentIdx.
|
inlineprivate |
Definition at line 158 of file weapon_base.c.
References m_Charged.
Referenced by SetInitialState().
|
inlineprivate |
Definition at line 2256 of file weapon_base.c.
References m_coolDownTime.
|
inlineprivate |
Definition at line 145 of file weapon_base.c.
References WeaponStableState::IsDischarged(), m_fsm, SetCharged(), and SetWeaponOpen().
|
inlineprotected |
Definition at line 409 of file weapon_base.c.
References m_isJammed.
|
inlineprivate |
Definition at line 2250 of file weapon_base.c.
Referenced by ProcessWeaponEvent().
|
inlineprivate |
Definition at line 2029 of file weapon_base.c.
References m_ChanceToJamSync.
|
inlineprotected |
Definition at line 1366 of file weapon_base.c.
References m_WasIronSight.
Referenced by OnItemLocationChanged().
|
inlineprotected |
Definition at line 329 of file weapon_base.c.
References m_weaponAnimState.
|
inlineprivate |
Definition at line 168 of file weapon_base.c.
References m_WeaponOpen.
Referenced by SetInitialState().
|
inlineprotected |
Definition at line 387 of file weapon_base.c.
References m_bulletSelectionIndex.
|
inlineprivate |
Definition at line 2138 of file weapon_base.c.
References m_magazineSimpleSelectionIndex.
Referenced by ForceSyncSelectionState(), and SyncSelectionState().
|
inlineprotected |
Definition at line 748 of file weapon_base.c.
References FillChamber(), FillInnerMagazine(), and SpawnAttachedMagazine().
Referenced by OnDebugSpawn().
|
inlineprotected |
Definition at line 771 of file weapon_base.c.
References ErrorEx, FillChamber(), GetDebugName(), MustBeChambered(), Math::RandomIntInclusive(), RandomizeFSMState(), and Synchronize().
Referenced by SpawnAmmo().
|
inlineprotected |
Definition at line 1258 of file weapon_base.c.
|
inlineprotected |
Definition at line 1240 of file weapon_base.c.
References WeaponEventBase::GetEventID(), INPUT_UDT_WEAPON_REMOTE_EVENT, LogManager::IsWeaponLogEnable(), WeaponEventBase::m_magazine, WeaponEventBase::m_player, wpnDebugPrint(), Serializer::Write(), and WeaponEventBase::WriteToContext().
Referenced by ProcessWeaponAbortEvent(), and ProcessWeaponEvent().
Definition at line 421 of file weapon_base.c.
References HideMagazine(), and ShowMagazine().
Referenced by AfterStoreLoad(), and LoadCurrentFSMState().
|
inlineprivate |
Definition at line 2260 of file weapon_base.c.
References m_coolDownTime.
|
inlineprotected |
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 |
CFGGAMEPLAY
Definition at line 1385 of file weapon_base.c.
References dBodyIsDynamic(), dynamicMode, DiagMenu::GetValue(), CfgGameplayHandler::GetWeaponObstructionModeDynamic(), CfgGameplayHandler::GetWeaponObstructionModeStatic(), HumanMovementState::IsInProne(), HumanMovementState::IsInRaisedProne(), m_ObstructionDistance, and staticMode.
|
inlineprotected |
Definition at line 1086 of file weapon_base.c.
References m_fsm.
Referenced by DelayedValidateAndRepair(), and OnInventoryEnter().
|
inlineprivate |
Definition at line 79 of file weapon_base.c.
References g_Game, InitDOFProperties(), InitObstructionDistance(), InitReliability(), InitShoulderDistance(), Weapon_Base::InitStateMachine(), InitWeaponLength(), InitWeaponLiftCheckVerticalOffset(), m_BayonetAttached, m_BayonetAttachmentIdx, m_bulletSelectionIndex, m_BurstCount, m_ButtstockAttached, m_ButtstockAttachmentIdx, m_ChanceToJam, m_DelayedValidationTimer, m_DOFProperties, m_magazineSimpleSelectionIndex, m_WasIronSight, and m_weaponHideBarrelIdx.
Referenced by CopyWeaponStateFrom(), and CreateWeaponWithAmmo().
|
protected |
Definition at line 47 of file weapon_base.c.
Definition at line 75 of file weapon_base.c.
|
protected |
Definition at line 48 of file weapon_base.c.
Referenced by GetAbility(), and GetAbilityCount().
|
protected |
Definition at line 52 of file weapon_base.c.
Referenced by HasBayonetAttached(), SetBayonetAttached(), and Weapon_Base().
|
protected |
Definition at line 58 of file weapon_base.c.
Referenced by GetBayonetAttachmentIdx(), ProcessMeleeItemDamage(), SetBayonetAttached(), and Weapon_Base().
Definition at line 70 of file weapon_base.c.
Referenced by HideBullet(), ShowBullet(), and Weapon_Base().
|
protected |
Definition at line 57 of file weapon_base.c.
Referenced by GetBurstCount(), OnFire(), ResetBurstCount(), and Weapon_Base().
|
protected |
Definition at line 53 of file weapon_base.c.
Referenced by HasButtstockAttached(), SetButtstockAttached(), and Weapon_Base().
|
protected |
Definition at line 59 of file weapon_base.c.
Referenced by GetButtstockAttachmentIdx(), ProcessMeleeItemDamage(), SetButtstockAttached(), and Weapon_Base().
Definition at line 72 of file weapon_base.c.
Referenced by GetChanceToJam(), and Weapon_Base().
|
protected |
Definition at line 73 of file weapon_base.c.
Referenced by GetSyncChanceToJam(), and SetSyncJammingChance().
|
protected |
Definition at line 54 of file weapon_base.c.
Referenced by IsCharged(), and SetCharged().
|
private |
Definition at line 77 of file weapon_base.c.
Referenced by IsCoolDown(), SetCoolDown(), and UpdateCoolDown().
|
protected |
Definition at line 76 of file weapon_base.c.
Referenced by DelayedValidateAndRepair(), and Weapon_Base().
|
protected |
Definition at line 63 of file weapon_base.c.
Definition at line 71 of file weapon_base.c.
Referenced by GetWeaponDOF(), and Weapon_Base().
|
protected |
weapon abilities
Definition at line 49 of file weapon_base.c.
Referenced by AfterStoreLoad(), CanProcessWeaponEvents(), GetCurrentStableStateID(), GetCurrentState(), GetInternalStateID(), LoadCurrentFSMState(), OnStoreLoad(), OnStoreSave(), ProcessWeaponAbortEvent(), ProcessWeaponEvent(), RandomizeFSMState(), SaveCurrentFSMState(), SetInitialState(), and ValidateAndRepair().
|
protected |
weapon state machine
Definition at line 50 of file weapon_base.c.
Referenced by IsJammed(), OnStoreLoad(), OnStoreSave(), and SetJammed().
|
protected |
Definition at line 69 of file weapon_base.c.
Referenced by LiftWeaponCheckEx().
|
protected |
Definition at line 68 of file weapon_base.c.
Referenced by LiftWeaponCheckEx().
|
protected |
Definition at line 51 of file weapon_base.c.
Referenced by CanFire(), and LiftWeaponCheckEx().
|
protected |
animation state the weapon is in, -1 == uninitialized
Definition at line 61 of file weapon_base.c.
Referenced by HideMagazine(), ShowMagazine(), and Weapon_Base().
|
protected |
Definition at line 67 of file weapon_base.c.
Referenced by GetObstructionPenetrationDistance(), InitObstructionDistance(), LiftWeaponCheckEx(), and UseWeaponObstruction().
|
protected |
Definition at line 74 of file weapon_base.c.
Referenced by GetPropertyModifierObject(), OnInventoryEnter(), and OnInventoryExit().
|
protected |
Definition at line 66 of file weapon_base.c.
Referenced by ApproximateBaseObstructionLength(), GetObstructionPenetrationDistance(), InitShoulderDistance(), and LiftWeaponCheckEx().
|
protected |
Definition at line 56 of file weapon_base.c.
Referenced by GetWasIronSight(), SetWasIronSight(), and Weapon_Base().
|
protected |
Definition at line 60 of file weapon_base.c.
Referenced by GetWeaponAnimState(), ResetWeaponAnimState(), and SetWeaponAnimState().
|
protected |
Definition at line 62 of file weapon_base.c.
Referenced by HideWeaponBarrel(), and Weapon_Base().
|
protected |
Definition at line 64 of file weapon_base.c.
Referenced by ApproximateBaseObstructionLength(), GetObstructionPenetrationDistance(), InitWeaponLength(), and LiftWeaponCheckEx().
|
protected |
Definition at line 65 of file weapon_base.c.
Referenced by ApproximateWeaponLiftTransform(), and InitWeaponLiftCheckVerticalOffset().
|
protected |
Definition at line 55 of file weapon_base.c.
Referenced by IsWeaponOpen(), and SetWeaponOpen().
|
private |
Full highest capacity magazine + chambered round.
Definition at line 41 of file weapon_base.c.
Referenced by OnDebugSpawn().
|
private |
Random bullet quantity + maybe chambered round.
Definition at line 43 of file weapon_base.c.
|
private |
Validation on client side delay to have time properly synchronize attachments needed for check.
Definition at line 45 of file weapon_base.c.
Referenced by DelayedValidateAndRepair().