![]() |
Dayz Explorer 1.28.160049
|
script counterpart to engine's class Weapon More...
Protected Member Functions | |
| float | GetWeightSpecialized (bool forceRecalc=false) |
| void | AssembleGun () |
| override on weapons with some assembly required | |
| bool | CanProcessAction (int action, int actionType) |
| bool | HasActionAbility (int action, int actionType) |
| query if weapon supports action and actionType | |
| int | GetAbilityCount () |
| AbilityRecord | GetAbility (int index) |
| bool | CanProcessWeaponEvents () |
| WeaponStateBase | GetCurrentState () |
| returns currently active state | |
| 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) | |
| bool | ProcessWeaponAbortEvent (WeaponEventBase e) |
| bool | CanChamberBullet (int muzzleIndex, Magazine mag) |
| void | SetWeaponAnimState (int state) |
| void | ResetWeaponAnimState () |
| int | GetWeaponAnimState () |
| void | EEFired (int muzzleType, int mode, string ammoType) |
| bool | JamCheck (int muzzleIndex) |
| void | ShowBullet (int muzzleIndex) |
| void | HideBullet (int muzzleIndex) |
| bool | IsJammed () |
| bool | CanEjectBullet () |
| void | SetJammed (bool value) |
| float | GetSyncChanceToJam () |
| float | GetChanceToJam () |
| void | SyncSelectionState (bool has_bullet, bool has_mag) |
| void | ForceSyncSelectionState () |
| override bool | OnStoreLoad (ParamsReadContext ctx, int version) |
| void | SaveCurrentFSMState (ParamsWriteContext ctx) |
| bool | LoadCurrentFSMState (ParamsReadContext ctx, int version) |
| override void | AfterStoreLoad () |
| override void | OnStoreSave (ParamsWriteContext ctx) |
| int | GetInternalStateID () |
| 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. | |
| array< MuzzleState > | GetMuzzleStates () |
| Helper method for RandomizeFSMState. | |
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) | |
| bool | SpawnAmmo (string magazineType="", int flags=WeaponWithAmmoFlags.CHAMBER) |
| General method trying to attch magazine, fill inner magazine and fill chamber. | |
| Magazine | SpawnAttachedMagazine (string magazineType="", int flags=WeaponWithAmmoFlags.CHAMBER) |
| Try to spawn and attach a magazine. | |
| bool | FillInnerMagazine (string ammoType="", int flags=WeaponWithAmmoFlags.CHAMBER) |
| Try to fill the inner magazine. | |
| bool | FillChamber (string ammoType="", int flags=WeaponWithAmmoFlags.CHAMBER) |
| Try to fill the 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) |
| 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") |
| static Weapon_Base | CreateWeaponWithAmmo (string weaponType, string magazineType="", int flags=WeaponWithAmmoFlags.CHAMBER) |
| Create weapon with ammo. | |
script counterpart to engine's class Weapon
Definition at line 48 of file inventoryitem.c.
|
protected |
Definition at line 612 of file weapon_base.c.
|
protected |
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.
|
protected |
override on weapons with some assembly required
Definition at line 324 of file weapon_base.c.
|
protected |
Definition at line 408 of file weapon_base.c.
|
protected |
Definition at line 1275 of file weapon_base.c.
|
protected |
Definition at line 1268 of file weapon_base.c.
Definition at line 236 of file weapon_base.c.
|
protected |
Definition at line 270 of file weapon_base.c.
Definition at line 1195 of file weapon_base.c.
Definition at line 1214 of file weapon_base.c.
|
staticprotected |
Create weapon with ammo.
| [in] | weaponType | string The weapon to create |
| [in] | magazineType | string The magazine to attach or ammo to load, passing in empty string will select random |
| [in] | flags | int Setup flags, please read WeaponWithAmmoFlags |
Definition at line 728 of file weapon_base.c.
|
protected |
Definition at line 1073 of file weapon_base.c.
Definition at line 341 of file weapon_base.c.
Definition at line 1116 of file weapon_base.c.
Definition at line 1123 of file weapon_base.c.
|
protected |
Definition at line 1130 of file weapon_base.c.
|
protected |
Try to fill the chamber.
| [in] | ammoType | string The ammo to load, passing in empty string will select random |
| [in] | flags | int Setup flags, please read WeaponWithAmmoFlags |
Definition at line 929 of file weapon_base.c.
|
protected |
Try to fill the inner magazine.
| [in] | ammoType | string The ammo to load, passing in empty string will select random |
| [in] | flags | int Setup flags, please read WeaponWithAmmoFlags |
Definition at line 839 of file weapon_base.c.
Definition at line 986 of file weapon_base.c.
|
protected |
Definition at line 462 of file weapon_base.c.
|
protected |
| [in] | index | index into m_abilities storage |
Definition at line 265 of file weapon_base.c.
|
protected |
Definition at line 260 of file weapon_base.c.
|
protected |
Definition at line 1476 of file weapon_base.c.
|
protected |
Definition at line 1533 of file weapon_base.c.
|
protected |
Definition at line 411 of file weapon_base.c.
|
protected |
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.
|
protected |
returns currently active state
Definition at line 276 of file weapon_base.c.
|
protected |
Definition at line 652 of file weapon_base.c.
|
protected |
Helper method for RandomizeFSMState.
Definition at line 691 of file weapon_base.c.
|
protected |
Definition at line 1019 of file weapon_base.c.
|
protected |
Returns number of slots for attachments corrected for weapons.
Definition at line 1011 of file weapon_base.c.
|
protected |
Definition at line 410 of file weapon_base.c.
|
protected |
Definition at line 1360 of file weapon_base.c.
|
protected |
Definition at line 339 of file weapon_base.c.
Definition at line 1355 of file weapon_base.c.
Definition at line 1263 of file weapon_base.c.
Definition at line 173 of file weapon_base.c.
query if weapon supports action and actionType
| [in] | action | one of Human.actions (i.e. RELOAD, MECHANISM, ...) |
| [in] | actionType | one of Human.actionTypes (i.e. CHAMBERING_ONEBULLET_CLOSED, MECHANISM_CLOSED...) |
Definition at line 246 of file weapon_base.c.
|
protected |
Definition at line 397 of file weapon_base.c.
Initializes DOF properties for weapon's ironsight/optics cameras.
Definition at line 1285 of file weapon_base.c.
|
protected |
gets weapon obstruction distance from shoulder at which the weapon is fully obstructed
Definition at line 1343 of file weapon_base.c.
Definition at line 1295 of file weapon_base.c.
|
protected |
gets approximate weapon distance from shoulder from config
Definition at line 1330 of file weapon_base.c.
|
protected |
gets weapon length from config for weaponlift raycast
Definition at line 1306 of file weapon_base.c.
|
protected |
gets weapon vertical offset from config for weaponlift raycast
Definition at line 1318 of file weapon_base.c.
|
protected |
Definition at line 286 of file weapon_base.c.
|
protected |
Definition at line 407 of file weapon_base.c.
|
protected |
Definition at line 1224 of file weapon_base.c.
|
protected |
returns true if state machine started playing action/actionType and waits for finish
Definition at line 281 of file weapon_base.c.
Definition at line 374 of file weapon_base.c.
|
protected |
Definition at line 1372 of file weapon_base.c.
|
protected |
Definition at line 579 of file weapon_base.c.
|
protected |
Definition at line 1028 of file weapon_base.c.
|
protected |
Definition at line 1056 of file weapon_base.c.
|
protected |
Definition at line 1092 of file weapon_base.c.
|
protected |
Definition at line 1110 of file weapon_base.c.
Definition at line 1148 of file weapon_base.c.
|
protected |
Definition at line 489 of file weapon_base.c.
|
protected |
Definition at line 624 of file weapon_base.c.
|
protected |
@NOTE: warning: ProcessWeaponEvent can be called only within DayZPlayer::HandleWeapons (or CommandHandler)
Definition at line 315 of file weapon_base.c.
|
protected |
weapon's fsm handling of events @NOTE: warning: ProcessWeaponEvent can be called only within DayZPlayer::HandleWeapons (or CommandHandler)
Definition at line 295 of file weapon_base.c.
|
protected |
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.
|
protected |
Definition at line 334 of file weapon_base.c.
|
protected |
Definition at line 564 of file weapon_base.c.
|
protected |
Definition at line 409 of file weapon_base.c.
|
protected |
Definition at line 1366 of file weapon_base.c.
|
protected |
Definition at line 329 of file weapon_base.c.
|
protected |
Definition at line 387 of file weapon_base.c.
|
protected |
General method trying to attch magazine, fill inner magazine and fill chamber.
| [in] | magazineType | string The magazine to attach or ammo to load, passing in empty string will select random |
| [in] | flags | int Setup flags, please read WeaponWithAmmoFlags |
Definition at line 748 of file weapon_base.c.
|
protected |
Try to spawn and attach a magazine.
| [in] | magazineType | string The magazine to attach, passing in empty string will select random |
| [in] | flags | int Setup flags, please read WeaponWithAmmoFlags |
Definition at line 771 of file weapon_base.c.
|
protected |
Definition at line 1258 of file weapon_base.c.
|
protected |
Definition at line 1240 of file weapon_base.c.
Definition at line 421 of file weapon_base.c.
|
protected |
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.
|
protected |
Definition at line 1086 of file weapon_base.c.
|
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.
|
protected |
Definition at line 52 of file weapon_base.c.
|
protected |
Definition at line 58 of file weapon_base.c.
Definition at line 70 of file weapon_base.c.
|
protected |
Definition at line 57 of file weapon_base.c.
|
protected |
Definition at line 53 of file weapon_base.c.
|
protected |
Definition at line 59 of file weapon_base.c.
Definition at line 72 of file weapon_base.c.
|
protected |
Definition at line 73 of file weapon_base.c.
Definition at line 54 of file weapon_base.c.
|
protected |
Definition at line 76 of file weapon_base.c.
|
protected |
Definition at line 63 of file weapon_base.c.
Definition at line 71 of file weapon_base.c.
|
protected |
weapon abilities
Definition at line 49 of file weapon_base.c.
weapon state machine
Definition at line 50 of file weapon_base.c.
|
protected |
Definition at line 69 of file weapon_base.c.
|
protected |
Definition at line 68 of file weapon_base.c.
Definition at line 51 of file weapon_base.c.
|
protected |
animation state the weapon is in, -1 == uninitialized
Definition at line 61 of file weapon_base.c.
|
protected |
Definition at line 67 of file weapon_base.c.
|
protected |
Definition at line 74 of file weapon_base.c.
|
protected |
Definition at line 66 of file weapon_base.c.
|
protected |
Definition at line 56 of file weapon_base.c.
|
protected |
Definition at line 60 of file weapon_base.c.
|
protected |
Definition at line 62 of file weapon_base.c.
|
protected |
Definition at line 64 of file weapon_base.c.
|
protected |
Definition at line 65 of file weapon_base.c.
Definition at line 55 of file weapon_base.c.