Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
akm.c
Go to the documentation of this file.
1 class AKM_Base : RifleBoltFree_Base
2 {
3  override RecoilBase SpawnRecoilObject()
4  {
5  return new AkmRecoil(this);
6  }
7 
8  /*override int GetWeaponSpecificCommand(int weaponAction ,int subCommand)
9  {
10  if ( weaponAction == WeaponActions.RELOAD)
11  {
12  switch (subCommand)
13  {
14  case WeaponActionReloadTypes.RELOADSRIFLE_MAGAZINE_BULLET:
15  return WeaponActionReloadTypes.RELOADRIFLE_MAGAZINE_BULLET;
16 
17  case WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_BULLET:
18  return WeaponActionReloadTypes.RELOADRIFLE_NOMAGAZINE_BULLET;
19 
20  case WeaponActionReloadTypes.RELOADSRIFLE_MAGAZINE_NOBULLET:
21  return WeaponActionReloadTypes.RELOADRIFLE_MAGAZINE_NOBULLET;
22 
23  case WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_NOBULLET:
24  return WeaponActionReloadTypes.RELOADRIFLE_NOMAGAZINE_NOBULLET;
25 
26  default:
27  return subCommand;
28  }
29 
30  }
31  return subCommand;
32  }*/
33 
34  override bool CanEnterIronsights()
35  {
36  ItemOptics optic = GetAttachedOptics();
37  if (optic && PSO1Optic.Cast(optic) || PSO11Optic.Cast(optic) || KazuarOptic.Cast(optic))
38  return true;
39  return super.CanEnterIronsights();
40  }
41 
42  //Debug menu Spawn Ground Special
43  override void OnDebugSpawn()
44  {
45  GameInventory inventory = GetInventory();
46 
47  inventory.CreateInInventory( "AK_WoodBttstck" );
48  inventory.CreateInInventory( "AK_RailHndgrd" );
49  inventory.CreateInInventory( "AK_Bayonet" );
50  inventory.CreateInInventory( "UniversalLight" );
51  inventory.CreateInInventory( "KobraOptic" );
52  inventory.CreateInInventory( "Battery9V" );
53  inventory.CreateInInventory( "Battery9V" );
54 
55  // Calling super for this one will just pick the 300 round mag
56  SpawnAttachedMagazine("Mag_AKM_Drum75Rnd");
57  }
58 };
AKM_Base
Definition: akm.c:1
AkmRecoil
Definition: akmrecoil.c:1
RecoilBase
Definition: recoilbase.c:1
KazuarOptic
Definition: optics.c:14
ItemOptics
Definition: itemoptics.c:1
GameInventory
script counterpart to engine's class Inventory
Definition: inventory.c:78