DayZ 1.24
|
script counterpart to engine's class Weapon More...
Private Member Functions | |
override int | GetSlotsCountCorrect () |
Returns number of slots for attachments corrected for weapons. | |
Private Attributes | |
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. | |
script counterpart to engine's class Weapon
Definition at line 48 of file InventoryItem.c.
Definition at line 583 of file Weapon_Base.c.
|
protected |
override on weapons with some assembly required
Definition at line 1761 of file Weapon_Base.c.
Definition at line 303 of file Weapon_Base.c.
References IsChamberFiredOut(), and IsChamberFull().
|
inlineprotected |
Definition at line 383 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1160 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1153 of file Weapon_Base.c.
References IsChamberFiredOut(), IsDamageDestroyed(), and IsJammed().
Definition at line 215 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 249 of file Weapon_Base.c.
Definition at line 1082 of file Weapon_Base.c.
Definition at line 1101 of file Weapon_Base.c.
References IsIdle(), LogManager::IsWeaponLogEnable(), Type, and wpnDebugPrint().
|
inlineprotected |
Definition at line 1611 of file Weapon_Base.c.
References OnStoreLoad().
|
inlinestaticprotected |
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 697 of file Weapon_Base.c.
References ECE_PLACE_ON_SURFACE, ErrorEx, GetGame(), and vector::Zero.
Definition at line 320 of file Weapon_Base.c.
References GetGame(), and IncreaseOverheating().
Definition at line 116 of file Weapon_Base.c.
References Weapon_Base::AssembleGun(), CALL_CATEGORY_GAMEPLAY, and GetGame().
Definition at line 1033 of file Weapon_Base.c.
Definition at line 1040 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1047 of file Weapon_Base.c.
|
inlineprotected |
unload bullet from chamber or internal magazine
@NOTE: EjectCartridge = GetCartridgeInfo + PopCartridge
[in] | muzzleIndex | |
[out] | ammoDamage | damage of the ammo |
[out] | ammoTypeName | type name of the ejected ammo |
Definition at line 1596 of file Weapon_Base.c.
|
inlineprotected |
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 862 of file Weapon_Base.c.
References AmmoTypesAPI::MagazineTypeToAmmoType(), Math::RandomIntInclusive(), and Synchronize().
|
inlineprotected |
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 796 of file Weapon_Base.c.
References AmmoTypesAPI::MagazineTypeToAmmoType(), and Math::RandomIntInclusive().
|
inlineprotected |
Definition at line 435 of file Weapon_Base.c.
References Weapon_Base::HideBullet(), IsChamberFull(), and Weapon_Base::ShowBullet().
|
inlineprotected |
[in] | index | index into m_abilities storage |
Definition at line 244 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1653 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1737 of file Weapon_Base.c.
Definition at line 1669 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 386 of file Weapon_Base.c.
|
inlineprotected |
tries to return identifier of current stable state (or nearest stable state if unstable state is currently running)
Definition at line 633 of file Weapon_Base.c.
|
inlineprotected |
returns currently active state
Definition at line 255 of file Weapon_Base.c.
|
inlineprotected |
Returns effective length of attachments that influence total weapon length.
Definition at line 1564 of file Weapon_Base.c.
References Math::Max().
|
inlineprotected |
Definition at line 623 of file Weapon_Base.c.
|
inlineprotected |
Helper method for RandomizeFSMState.
Definition at line 660 of file Weapon_Base.c.
References ErrorEx, IsChamberFiredOut(), and IsChamberFull().
|
inlineprotected |
Definition at line 960 of file Weapon_Base.c.
Returns number of slots for attachments corrected for weapons.
Definition at line 952 of file Weapon_Base.c.
Returns number of slots for attachments corrected for weapons.
Definition at line 6 of file BinocularsBase.c.
|
inlineprotected |
Definition at line 385 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 318 of file Weapon_Base.c.
Definition at line 1227 of file Weapon_Base.c.
Definition at line 1148 of file Weapon_Base.c.
Definition at line 152 of file Weapon_Base.c.
References g_Game, and Ammunition_Base::GetAmmoWeightByBulletType().
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 225 of file Weapon_Base.c.
Definition at line 1648 of file Weapon_Base.c.
Definition at line 1664 of file Weapon_Base.c.
Definition at line 374 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1692 of file Weapon_Base.c.
Initializes DOF properties for weapon's ironsight/optics cameras.
Definition at line 1170 of file Weapon_Base.c.
Definition at line 1180 of file Weapon_Base.c.
|
inlineprotected |
gets approximate weapon distance from shoulder from config
Definition at line 1215 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 114 of file Weapon_Base.c.
|
inlineprotected |
gets weapon length from config for weaponlift raycast
Definition at line 1191 of file Weapon_Base.c.
|
inlineprotected |
gets weapon vertical offset from config for weaponlift raycast
Definition at line 1203 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 132 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 265 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 382 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1109 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1732 of file Weapon_Base.c.
|
inlineprotected |
returns true if state machine started playing action/actionType and waits for finish
Definition at line 260 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 142 of file Weapon_Base.c.
Definition at line 353 of file Weapon_Base.c.
|
inlineprotected |
snippet below measures distance from "RightHandIndex1" bone for lifting calibration
Definition at line 1233 of file Weapon_Base.c.
References Math::Acos(), Math::Asin(), DbgUI::Begin(), DbgUI::BeginCleanupScope(), Math::Clamp(), COLOR_BLUE, COLOR_GREEN, COLOR_RED, COLOR_WHITE, COLOR_YELLOW, Math::DEG2RAD, vector::Dot(), DbgUI::End(), DbgUI::EndCleanupScope(), GetGame(), DiagMenu::GetValue(), Math::InverseLerp(), vector::Lerp(), Math3D::MatrixMultiply3(), Print(), Math::RAD2DEG, DayZPhysics::RaycastRVProxy(), vector::RotateAroundZeroDeg(), Shape, DbgUI::Text(), vector::Up, Vector(), Math3D::YawPitchRollMatrix(), and vector::Zero.
|
inlineprotected |
Return whether provided material triggers weapon lift (true) or not (false).
Definition at line 1558 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 550 of file Weapon_Base.c.
References Error(), GetType(), LogManager::IsWeaponLogEnable(), and wpnDebugPrint().
Definition at line 1770 of file Weapon_Base.c.
Definition at line 967 of file Weapon_Base.c.
Definition at line 995 of file Weapon_Base.c.
References GetGame(), GetPosition, and SEffectManager::PlaySound().
Definition at line 1018 of file Weapon_Base.c.
Definition at line 1027 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1063 of file Weapon_Base.c.
References Class::CastTo().
|
inlineprotected |
Definition at line 462 of file Weapon_Base.c.
References Error(), LogManager::IsWeaponLogEnable(), and wpnDebugPrint().
|
inlineprotected |
Definition at line 595 of file Weapon_Base.c.
Definition at line 1700 of file Weapon_Base.c.
|
inlineprotected |
@NOTE: warning: ProcessWeaponEvent can be called only within DayZPlayer::HandleWeapons (or CommandHandler)
Definition at line 294 of file Weapon_Base.c.
|
inlineprotected |
weapon's fsm handling of events @NOTE: warning: ProcessWeaponEvent can be called only within DayZPlayer::HandleWeapons (or CommandHandler)
Definition at line 274 of file Weapon_Base.c.
|
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 644 of file Weapon_Base.c.
References IsJammed().
|
inlineprotected |
Definition at line 1742 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 313 of file Weapon_Base.c.
References fsmDebugSpam(), and LogManager::IsWeaponLogEnable().
|
inlineprotected |
Definition at line 535 of file Weapon_Base.c.
References Error(), GetType(), LogManager::IsWeaponLogEnable(), and wpnDebugPrint().
Definition at line 1747 of file Weapon_Base.c.
References AddAction(), and FirearmActionLoadBulletQuick().
attachment helpers (firearm melee)
Definition at line 1642 of file Weapon_Base.c.
Definition at line 1658 of file Weapon_Base.c.
Definition at line 137 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 124 of file Weapon_Base.c.
Definition at line 384 of file Weapon_Base.c.
Definition at line 1581 of file Weapon_Base.c.
Definition at line 308 of file Weapon_Base.c.
Definition at line 147 of file Weapon_Base.c.
Definition at line 366 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1684 of file Weapon_Base.c.
|
inlineprotected |
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 717 of file Weapon_Base.c.
|
inlineprotected |
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 740 of file Weapon_Base.c.
References ErrorEx, GetDebugName(), Math::RandomIntInclusive(), and Synchronize().
|
inlineprotected |
Definition at line 1143 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1125 of file Weapon_Base.c.
References INPUT_UDT_WEAPON_REMOTE_EVENT, LogManager::IsWeaponLogEnable(), and wpnDebugPrint().
Definition at line 396 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 1012 of file Weapon_Base.c.
|
inlineprotected |
Definition at line 72 of file Weapon_Base.c.
References GetGame(), and Weapon_Base::InitStateMachine().
Definition at line 45 of file Weapon_Base.c.
Definition at line 70 of file Weapon_Base.c.
|
protected |
Definition at line 46 of file Weapon_Base.c.
|
protected |
Definition at line 50 of file Weapon_Base.c.
|
protected |
Definition at line 55 of file Weapon_Base.c.
Definition at line 65 of file Weapon_Base.c.
|
protected |
Definition at line 54 of file Weapon_Base.c.
|
protected |
Definition at line 51 of file Weapon_Base.c.
|
protected |
Definition at line 56 of file Weapon_Base.c.
Definition at line 67 of file Weapon_Base.c.
|
protected |
Definition at line 68 of file Weapon_Base.c.
Definition at line 52 of file Weapon_Base.c.
|
protected |
Definition at line 60 of file Weapon_Base.c.
Definition at line 66 of file Weapon_Base.c.
weapon abilities
Definition at line 47 of file Weapon_Base.c.
weapon state machine
Definition at line 48 of file Weapon_Base.c.
|
protected |
Definition at line 64 of file Weapon_Base.c.
Definition at line 49 of file Weapon_Base.c.
|
protected |
animation state the weapon is in, -1 == uninitialized
Definition at line 58 of file Weapon_Base.c.
|
protected |
Definition at line 69 of file Weapon_Base.c.
|
protected |
Definition at line 63 of file Weapon_Base.c.
|
protected |
Definition at line 57 of file Weapon_Base.c.
|
protected |
Definition at line 59 of file Weapon_Base.c.
|
protected |
Definition at line 61 of file Weapon_Base.c.
|
protected |
Definition at line 62 of file Weapon_Base.c.
Definition at line 53 of file Weapon_Base.c.
|
private |
Full highest capacity magazine + chambered round.
Definition at line 41 of file Weapon_Base.c.
|
private |
Random bullet quantity + maybe chambered round.
Definition at line 43 of file Weapon_Base.c.