DayZ 1.24
Loading...
Searching...
No Matches
Crossbow.c File Reference

Go to the source code of this file.

Classes

class  WeaponStableState
 represents weapon's stable state (i.e. the basic states that the weapon will spend the most time in) More...
 
class  Crossbow_Base
 base for Crossbow @NOTE name copies config base class More...
 

Enumerations

enum  XBAnimState { uncocked = 0 , cocked = 1 }
 
enum  XBStableStateID
 

Functions

enum XBStableStateID OnEntry (WeaponEventBase e)
 
override void OnExit (WeaponEventBase e)
 
override int GetCurrentStateID ()
 
override bool HasBullet ()
 
override bool HasMagazine ()
 
override bool IsJammed ()
 
override bool IsRepairEnabled ()
 
override void InitMuzzleArray ()
 

Variables

 UNKNOWN = 0
 
 UncockedEmpty = 1
 
 CockedEmpty = 2
 
 Loaded = 3
 
class XBCockedEmpty extends WeaponStableState OnEntry
 

Enumeration Type Documentation

◆ XBAnimState

Enumerator
uncocked 

default weapon state, closed and discharged

cocked 

Definition at line 1 of file Crossbow.c.

2{
3 uncocked = 0,
4 cocked = 1,
5};
@ uncocked
default weapon state, closed and discharged
Definition Crossbow.c:3
@ cocked
Definition Crossbow.c:4

◆ XBStableStateID

Definition at line 7 of file Crossbow.c.

8{
9 UNKNOWN = 0,
10 UncockedEmpty = 1,
11 CockedEmpty = 2,
12 Loaded = 3,
13}
Loaded
Definition Crossbow.c:21
UNKNOWN
Definition Crossbow.c:18
UncockedEmpty
Definition Crossbow.c:19
CockedEmpty
Definition Crossbow.c:20

Function Documentation

◆ GetCurrentStateID()

override int GetCurrentStateID ( )

Definition at line 19 of file Crossbow.c.

19{ return XBStableStateID.UncockedEmpty; }
XBStableStateID
Definition Crossbow.c:8

◆ HasBullet()

override bool HasBullet ( )

Definition at line 20 of file Crossbow.c.

20{ return false; }

◆ HasMagazine()

override bool HasMagazine ( )

Definition at line 21 of file Crossbow.c.

21{ return false; }

◆ InitMuzzleArray()

override void InitMuzzleArray ( )

Definition at line 24 of file Crossbow.c.

MuzzleState
ref array< MuzzleState > m_muzzleHasBullet

References m_muzzleHasBullet.

◆ IsJammed()

override bool IsJammed ( )

Definition at line 22 of file Crossbow.c.

22{ return false; }

Referenced by Weapon::CanFire(), and Weapon::RandomizeFSMState().

◆ IsRepairEnabled()

override bool IsRepairEnabled ( )

Definition at line 23 of file Crossbow.c.

23{ return true; }

◆ OnEntry()

Definition at line 1 of file Crossbow.c.

17{ if (LogManager.IsWeaponLogEnable()) wpnPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " { Uncocked Empty UE"); m_weapon.SetCharged(false); super.OnEntry(e); }
void wpnPrint(string s)
Definition Debug.c:1
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
Definition Guards.c:602
static bool IsWeaponLogEnable()
Definition Debug.c:799

◆ OnExit()

Definition at line 18 of file Crossbow.c.

18{ super.OnExit(e); if (LogManager.IsWeaponLogEnable()) wpnPrint("[wpnfsm] " + Object.GetDebugName(m_weapon) + " } Uncocked Empty UE"); }

References LogManager::IsWeaponLogEnable(), m_weapon, and wpnPrint().

Variable Documentation

◆ CockedEmpty

CockedEmpty = 2

Definition at line 20 of file Crossbow.c.

◆ Loaded

Loaded = 3

Definition at line 21 of file Crossbow.c.

◆ OnEntry

◆ UncockedEmpty

UncockedEmpty = 1

Definition at line 19 of file Crossbow.c.

◆ UNKNOWN

@ UNKNOWN = 0

Definition at line 18 of file Crossbow.c.